Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Qliksense_77
Creator
Creator

Two variants of variable input in one app and set default values for both

Hi,

I have made an app where I use two "variable input" from Qlik dashboard bundle. 

One variable input is for dimension. 

The other variable input is for measure. I only use this "variable input" for one sheet. In the other sheets the user have no option to change measure.

My problem is that in the sheet with "variable input" for measure , there is only preselected a dimension. 

Therefore the visualisations are empty until the users select a measure. 

Is it possible to set a default value also in the "variable input for measures"? 

1 Solution

Accepted Solutions
Sammy_AK
Creator II
Creator II

Yes, in the measure of the chart / visualization you can write an condition. 

if(vMeasure = 0,  sum(1), sum(2))

in the variable input map the vMeasure variable and set its value as 1.

sum(1) is the default measure and sum 2 is the measure you want to show when the variable in selected .

hope this helps...

View solution in original post

2 Replies
Sammy_AK
Creator II
Creator II

Yes, in the measure of the chart / visualization you can write an condition. 

if(vMeasure = 0,  sum(1), sum(2))

in the variable input map the vMeasure variable and set its value as 1.

sum(1) is the default measure and sum 2 is the measure you want to show when the variable in selected .

hope this helps...

Qliksense_77
Creator
Creator
Author

Hi @Sammy_AK ,

Thank you. I am going to accept it as a solution.

I was hoping for a different solution, because I already have so many if statements in my visualisations and it is difficult too add more.