I am working on a requirement where I created a parameter called SelectedYear with values like 2015, 2016, … 2025, etc.
Currently, I am showing Sales, GP, and GP% in a Pivot Table with the below format:
Current Output (when SelectedYear = 2025)
STORE
2025 SALES
2025 GP
2025 GP%
PRIOR YEAR SALES
PRIOR YEAR GP
PRIOR YEAR GP%
1
$28,476,632.94
$4,713,261.64
16.55
$29,847,282.29
$4,633,109.91
15.52
2
$3,745,988.37
$838,953.39
22.39
$3,529,381.57
$775,743.01
21.97
3
$16,066.00
$4,350.08
27.07
$16,365.50
$4,397.06
26.86
4
$0.00
$0.00
$4,916,636.81
$419,919.14
8.54
5
$10,207,980.62
$1,798,291.24
17.61
$9,176,775.23
$1,598,382.28
17.41
Expected Output (Dynamic Headers)
When SelectedYear = 2025, the headers should look like this:
STORE
2025 SALES
2025 GP
2025 GP%
2024 SALES
2024 GP
2024 GP%
1
$28,476,632.94
$4,713,261.64
16.55
$29,847,282.29
$4,633,109.91
15.52
2
$3,745,988.37
$838,953.39
22.39
$3,529,381.57
$775,743.01
21.97
3
$16,066.00
$4,350.08
27.07
$16,365.50
$4,397.06
26.86
4
$0.00
$0.00
$4,916,636.81
$419,919.14
8.54
Similarly, if SelectedYear = 2024, the headers should update dynamically like this:
STORE
2024 SALES
2024 GP
2024 GP%
2023 SALES
2023 GP
2023 GP%
1
$29,847,282.29
$4,633,109.91
15.52
$28,476,632.94
$4,713,261.64
16.55
2
$3,529,381.57
$775,743.01
21.97
$3,745,988.37
$838,953.39
22.39
Requirement:
Is there a way in QuickSight to dynamically update column headers based on the parameter value (SelectedYear) and also show prior year values (SelectedYear - 1)?
This would allow users to compare selected year vs. prior year with correct year labels in the Pivot Table headers.
There is an option to use a parameter instead of the actual column name. But you need to open the dashboard via a URL navigation and pass all these dynamic parameters in order to make this work.
I had done some experimentation in relation to multi-lingual dashboards. The same approach can be used. But it is too much work for very little value.
Yes, it’s dynamic. Whenever we select 2025, it shows 2025 Sales. At the same time, I also want the Prior Year columns (like 2024 Sales, 2024 GP, 2024 GP%) to update dynamically as well.
Hope everything is well! Just checking in to see if you saw Giridhar.Prabhu’s previous message in regard to seeing some mock details of the dataset, or if you were able to find a workaround to your question in the meantime. If not, please feel free to elaborate on any persistent issues or concerns you might be facing. If we do not hear back in the next 3 business days, I’ll close out of this topic.
Since we have not heard back, I’ll go ahead and close out of this topic. However, if you have any other questions, please feel free to post again in the QuickSight Community and link this discussion for any relevant information!