Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Dynamically changing column header name of a straight or pivot table based on selections made

Hi All,

I have a question - On the top I have months and quarters measure to select, so if Jan is selected, Jan data will be shown and if Quarter is selected, say Q1 then data in dashboard will show Q1 data. Now I have a straight table where columns Months Actual and Month Target are column headers showing actual and target numbers for metrics in the table. Can it be possible that when I click Q1, these column headers dynamically change to Q1 actual instead of month actual and Q1 target instead of month target. SO when I click on Feb or March instead of Q1, these should go back to month actual and month target. Hope I am clear.

3 Replies
settu_periasamy
Master III
Master III

Hi,

i think you are talking about label. if so, you can achieve thru if or match function.

like, in the Actual Expression Label

=if(GetSelectedCount(Month),'Month Actual',if(GetSelectedCount(Qtr),'Qtr Actual','Month Actual'))


in the Target Expression Label

=if(GetSelectedCount(Month),'Month Target',if(GetSelectedCount(Qtr),'Qtr Target','Month Target'))

find the sample attached.

jonathandienst
Partner - Champion III
Partner - Champion III

You are on the right track, but you can simplify the expressions:

=if(GetSelectedCount(Qtr),'Qtr Actual','Month Actual')

=if(GetSelectedCount(Qtr),'Qtr Target','Month Target')

These are functionally identical to those yo posted.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

Thank you settu and jonathan. I will definitely try the approaches. Thanks again