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:
-
-
total_currentyear → returns the total for the selected year (pYear)
-
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
