Qlik Community

Qlik Sense Advanced Authoring

Discussion board where members can learn more about Qlik Sense Advanced Authoring.

Announcements
BI & Data Trends 2021. Discover the top 10 trends emerging in today. Join us on Dec. 8th REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Creator
Creator

Setting Multiple Variable Values at the one time

Hello there,

Using the Variable Input extension, I note it is possible to dynamically change the value of a single variable.

e.g. Variable1 is assigned a value based on a selection made by the user such as in a drop down box.

How do I set multiple variables at the one time:

ChartVariable1Variable2
ATotal1Line1
BTotal2Line2
CTotal2Line3

 

For example, if the user selects Chart A, then Variable 1 is set to 'Total1' and Variable2 is set to 'Line1'

Else I have expressions loaded in that are relying on the variable value

e.g.   Sum ( {< '$(Variable1)' = {1}>} Sales)

 

 

 

 

 

 

Labels (2)
1 Solution

Accepted Solutions
Highlighted
Creator
Creator

Hi Jordi,

Thanks for the reply.

Yes I couldn't quite work out how to use the Variable Input Extension twice.

In the end I did find a solution by creating an variable island in the data model  - loaded a table much like the one in my question.  

And then referenced the variables via Set Analysis e.g.

Sum( {<$(=FlagSelector) = {1}>}  $(=TotalSelector) ) 

works a treat.

 

 

 

 

 

 

 

 

View solution in original post

3 Replies
Highlighted
Partner
Partner

Hi,

Have you already set one variable? Then you can do exactly the same for nr 2. But if the Variable Input Extension can only hold one variable, then you need that one twice.

Jordy

Climber

Work smarter, not harder
Highlighted
Creator
Creator

Hi Jordi,

Thanks for the reply.

Yes I couldn't quite work out how to use the Variable Input Extension twice.

In the end I did find a solution by creating an variable island in the data model  - loaded a table much like the one in my question.  

And then referenced the variables via Set Analysis e.g.

Sum( {<$(=FlagSelector) = {1}>}  $(=TotalSelector) ) 

works a treat.

 

 

 

 

 

 

 

 

View solution in original post

Highlighted
Partner
Partner

Hi,

Sounds good! Great that it worked. Please close the post.

Jordy

Climber

Work smarter, not harder