Hi everyone,
A bit of a background. I have developed a custom function backed pivot table using typescript on my ontology object set. The need for that was due to the need to create aggregations for metrics that are time sensitive e.g. calculate trend related metrics , annualized metrics , etc. I was able to do that and have implemented the function which supports multiple hierarchy levels, expandable rows, parent level aggregation and the calculating of the metrics that otherwise Workshop front end cannot do.
However, I have ran into an issue, where if I want to display only 1 or few of the hierarchies at a time, or reorder the display of the pivot directly from the workshop UI, then I cannot do that due to the architecture of the nested and precomputed fields.
Few details on my implementation:
I query my object set and return an array of structured objects containing hierarchy properties and calculated financial metrics, following this approach:
export interface PivotRow {
x: string;
y?: string;
z?: string;
c?: string;
values: PivotValues;
}
The problem:
The hierarchy is effectively hardcoded in the TS function. In Workshop, I can configure the row grouping fields, but changing their order does not dynamically change the underlying aggregations.
Ideally, I want end users to be able to configure the pivot table directly within Workshop, similarly to the native pivot table configuration.
I would greatly appreciate any suggestion!
Thanks!