Skip to Main Content
Spotfire Ideas Portal
Status Future Consideration
Product Spotfire
Categories API
Created by Guest
Created on Sep 16, 2020

PersistentDataView constructor does not support expressions for Group-by

We heavily rely on Spotfire PersistentDataView class to generate summaries but we found out that unfortunately, this class does not support group-by expression as shown below:

public PersistentDataView(string name, IList<string> columnExpressions, IList<DataColumn> groupByColumns, DataTable baseTable, DataSelection baseSelection)

We have to use Data Columns to group-by. This is useful in some cases, but not sufficient in other cases.

For example, if we want to group by WEEK of a date-time column, then I need first to create a calculated column for WEEKs then use it in the PersistentView.

This gives us what we need but has many side effects ... for example, if the data table is used by other charts or transformations, then when we add calculated columns, all these charts and transformations are refreshed -> causing performance issues.

It would be great if you enhance the class constructor to accept List<string> for Group by.

  • Attach files
  • Guest
    Reply
    |
    Mar 25, 2021

    As a workaround that doesn't involve modifying the base table, you could add the Week expression (along with any other columns you need) to a non-aggregated PersistentDataView and then base your real aggregated PersistentDataView on that first view, using the Week column for grouping.