Qlik Community

App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
WE ARE LISTENING! New Navigation for Qlik Community, Sept. 26: TELL ME MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Shaglok
Contributor
Contributor

Button to change absolute and percentile view

Hi.

I am developing an app and I need to change very often between absolute numbers and percentiles in the tables. I think that a button would be an easy and elegant way to do it, but I don't know how to do that. Any advice, please?

Labels (1)
2 Replies
Mario_Petre
Support
Support

Have you tried changing dimensions based on variables with a button? There is a "Set variable" action, which you could use. I also wanted to confirm this is for Qlik Sense Enterprise on Windows. 

Or
Champion
Champion

1) Create a variable, e.g. vDisplayType and set its value to 0

2) Create a button that toggles this variable using a formula such as if(vDisplayType=0,1,0)

3) Within your master measures / expressions, you can refer to this variable, e.g. if(vDisplayType = 0,Sum(Value),Sum(Value)/Sum(Total Value)).

Alternatively, you can create two measures, add both to your table, and apply a "Show column if" condition to each one - one would be vDisplayType = 0 and one would be vDisplayType = 1. Note that this approach works fine for tables but is not available in most charts, iirc.