Workshop: Pivot Table: Dynamic Column Grouping

Hello everyone!

  • I am developing a pivot table in workshop
  • User can choose between 4 granularity: year, year_month, year_quarter, snapshot_date
  • 4 pivot tables to maintain because the column grouping is static
    • the year pivot table
    • the year_month pivot table
    • the year_quarter pivot table
    • the snapshot_date pivot table
  • I need to create a serie of 4 of these tables with different aggregations
  • I end up creating and maintaining 16 pivot tables

My suggestion:

  • the string variable “pivot_table_granularity” has “year” or “year_month” or “year_quarter” or “snapshot_date”
  • only one pivot table is created and maintained
  • this pivot table accepts “pivot_table_granularity” as its column grouping configuration
  • I only need to create one pivot table by aggregation serie.
  • Less widgets to maintain!
2 Likes

Hi @jf_baudron, thanks for the feature suggestion! We are planning to add support for function-backed groupings and aggregations to the Pivot Table in the late 2024 / early 2025 timeline, so there should be an easier way to accomplish this setup in the near future.

Appreciate the post!

2 Likes

@paulr do you have an updated timeline on function-backed aggregations?

Hey @theo_bell, still aiming for early 2025 and actively scoping out the feature now!

Hi @paulr , We are also interested in the feature of having dynamic column pivots where user picks the columns using string selector and Pivot widget automatically uses that columns for row groupings (more than 7 columns for row grouping). Would you share the timeline when the new feature will be rolled out

1 Like

I think it is this

https://www.palantir.com/docs/foundry/workshop/widgets-pivot-table#function-backed-pivot-tables

I’ve been using them - they’re OK. I will need to re-read the documentation, but it’s still a little difficult to show/hide certain columns. We’ve had to hide & show sections, rather than the table.

I would also recommend that you don’t consider these pivot tables and instead say to yourself “these are displaying two dimensional arrays.” If you follow the pattern, you’re just setting up two dimensional arrays who also just so happen to accept an aggregation as a row & column.