Dynamic Header Configuration in Pivot Tables

Hello,

I’m building a pivot table in Amazon QuickSight where I need the column headers to update dynamically based on the user-selected Month and Year filter.

Current Setup

I have two calculated measures:

    1. total_currentyear → returns the total for the selected year (pYear)

    2. total_lastyear → returns the total for the year before (pYear - 1)

Users select a Month and Year through two parameters (pMonthOfYear and pYear).

The values update correctly for both measures.

Problem

I want the pivot table column headers to reflect:

  • The selected year (e.g., “6/2025”)

  • The previous year (e.g., “6/2024”)

I can achieve the header for the current year by using the parameter pYear directly in the title.

However, QuickSight does not allow arithmetic inside pivot column headers, so I cannot set the previous-year column header to pYear-1.
This results in the column header for “last year” not updating dynamically. As u can see in these images:

What I Need Help With

Is there any supported method in QuickSight that allows pivot table column headers to dynamically display:

  • The selected year (pYear)

  • The previous year (pYear - 1)

without:

  • Creating additional datasets or backend data structures

  • Displaying additional parameter controls to the user

1 Like

Hi @mirandadinis70 and welcome to the Quick Community!
In terms of dynamic text, the customization options in Quick are fairly limited as the only option available is to use a parameter’s value, like you’ve already setup. The other issue here that’s limiting is that you can only set a parameter’s value by selecting an option or through a click action. So while you could setup another parameter to handle the prior year (and hide it from the sheet so that no selection is needed), you would not have a way of dynamically changing that value through the selection of other parameter values.
So as a work around, you could setup another parameter that holds the prior year value, but changing it dynamically based on another parameter selection would lead to this not being dynamic.
Because of the current limitations, you may have to go with default text like ‘Previous Year’ or something along those lines as you would not be able to assign another year dynamically in this scenario.

However, being able to change a parameter’s value through the selection of another parameter could help in a number of instances so I’ll tag this as a feature request to promote visibility to the AWS support team.

1 Like