Dynamic Column Names based on calculations

Hello Community!

I’m trying to create a table where values headers will change dynamically based on parameter.
The parameter is a Year from the dataset (i.e. 2022, 2023, 2024…)
There are two value columns. Their names should be: Year and Year+1

So once the user selects 2022, the columns names should be:
2022, 2023

for 2025:
2025, 2026

The problem I face:

I can’t seem to make Quicksight use Year +1 in the column header. Column header will accept only parameters (?). I can’t write a calculation to a column header either.
I was also thinking about creating a calculation (Parameter selected +1) that will feed parameter which could go into the header, but parameters can’t be based on calculations (?)

Is there a way to solve it?

Thanks!

hi @Filo

Welcome to QuickSight Community! thank you for posting your inquiry.

there is demo dashboard for dynamic measure on demo central : https://democentral.learnquicksight.online/#Dashboard-TipsAndTricks-Interactivity-Dynamic-Dimensions-and-Measures. the visual demonstrated in there is bar chart but if you go into analysis from the icon on left pain, you can change it to table. you can see how the column name for measure can be changed dynamically using parameter and calc field.

hope this helps.

kind reagrds,
Wakana

Hello Wakana!

Thanks for sending the example!
I the demo the name of the column is the exact value selected in the parameter. In the case I’m trying to solve, that would be the value selected +1 (which you could calculate turning the value into integer, adding 1 etc. - but calculation can’t be a source for the column header, it seems).

I rebuilt this case to spotlight the challenge. In this example once you select 2015 as a measure, the column header should read “2016” (2015+1).
I wonder if this is possible with quicksight?

Thanks!

hi @Filo,

hmm… yes, you are correct. the calc field name does not allow to use parameters so even if you have year+1 data in it, the column header won’t indicate precisely. I am tagging this as feature request.

kind regards,
Wakana

1 Like