Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
MilenaDrozdova10
Contributor
Contributor

a switch with absolute or average monthly values.

Hello, I need to add a switch that allows comparing the values of indicators by absolute or average monthly values.

I suppose I need to add a slider, but I don’t know how to write an expression.

Thank you

4 Replies
lblumenfeld
Partner Ambassador
Partner Ambassador

I need a little more information to know exactly wheat you're trying to do, but I think you're looking to do something like this.

Put a set of buttons on the sheet that let's the user toggle between "absolute" or "average" values. The use the selection to control a calculation. If so then you'd do the following... 

Create a variable in your load script. I'll call mine "ValueType". Set this to a default value. I'll use "Absolute".

Set ValueType = "Absolute";

Then add something to your sheet to let the user toggle the variable between "Absolute" and "Average". I'd recommend the QS-Variable extension that Qlik just added to the Dashboard Bundle. It's pretty self-explanatory, but reply if you need help with this.

Then, in your formulas you'd do something like this...

If('$(ValueType)' = 'Absolute', do the calculation for absolute, do the calculation for average)

Let me know if this helps. If not then please post a little more detail.

MilenaDrozdova10
Contributor
Contributor
Author

Hello, I have several indicators on my analytical model. I need to add a switch that allows you to switch the indicator data by absolute or average monthly values. I assume that the data should change in all indicators on the sheet when switching.

"Then add something to your sheet to let the user toggle the variable between "Absolute" and "Average". I'd recommend the QS-Variable extension that Qlik just added to the Dashboard Bundle. It's pretty self-explanatory, but reply if you need help with this."

Yes, I need help with that, because I don`t know how to do that. 

Thank you.

lblumenfeld
Partner Ambassador
Partner Ambassador

I've attached an app that does what I explained in the prior post. Take a look at it and let me know if this is what you were looking for.

 

Brett_Bleess
Former Employee
Former Employee

Are you using QlikView or Qlik Sense?  The file left for you is for Qlik Sense, and if that is what you are using, then I need to move your post to that product area, but if you are using QlikView, confirm back.  The best place I can give you to try to find some more helpful posts would be the Design Blog area, there are over 700 posts there, mostly how-to related that may give you some further ideas on how to approach things.

https://community.qlik.com/t5/Qlik-Design-Blog/bg-p/qlik-design-blog

Regards,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.