Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
beyzabetulcelik
Contributor
Contributor

Multiple selection variable

My goal:be able to select multiple months for my calculations.

I have a variable, and according to the choosen variable I have a calculation. For example I have a variable that can take values: 'January', 'February', 'March'.

And in my calculation I write:

If($(Var_Month) = 'January', SUM(liter1),
If($(Var_Month) = 'February', SUM(liter2),
If($(Var_Month) = 'March', SUM(liter3),
0)))

beyzabetulcelik_0-1725389041489.png

 I would like to be able to choose multiple as variable so I can calculate January and February at the same time when choosen. I looked for a multiple selection variable extension but I could not find. Can someone help about it?

 

NOTE: I don't have data that shows month or I date. I have liter1, liter2, liter3... as a column in the same row.

 

Labels (1)
2 Replies
madelonjansen
Partner Ambassador
Partner Ambassador

Since you have the buttons all on the same variable, it will always toggle the value of it, but you need it to append values. I think in this case you would need a variable for every month, and calculate based on that.

Something like:
Rangesum( if( $(vJanuary)=1, sum(Liter1),0), if( $(vFebruary)=1, sum(Liter2),0), ... )

beyzabetulcelik
Contributor
Contributor
Author

Thanks for the answer.

If I had variables for each month and have 1 option for each of them it looks like this. I cannot unselect a variable when selected. 

beyzabetulcelik_0-1725516426580.png

My other option is creating something like this. It solves my problem technically but it doesn't look good and it's not user friendly. 

beyzabetulcelik_1-1725516477170.png

Thats why I am trying to find an answer that user can choose only months (not something like on off). I think I cannot solve this with variable extension thats why I am looking for another extension.