Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
ali_hijazi
Partner - Master II
Partner - Master II

qliksense set variable

Hello

I'm new to QlikSense

I have a transaction table that has amounts in two currencies

I want the end user click a button to set a variable vCurrency

then in my expression I want to use if else statement and display either Sum(Sales_currency_1) or Sum(Sales_Currency_2)

depending on the value of the variable which is set by a button

Please advise

I can walk on water when it freezes
Labels (1)
3 Replies
tresB
Champion III
Champion III

if you want a button in qlik sense, you have to get one as extension. I would rather suggest to create an inline table with single field with two values, may be like:

Load * inline [

CurrencyFlag

Currency1

Currency2

];


And then define your variable like vCurrency=CurrencyFlag. Now when the users selects a value from CurrencyFlag, it gets assigned to the variable. Then your if expression should work fine.


ali_hijazi
Partner - Master II
Partner - Master II
Author

Sounds good

but how to get these extension and how to get them work?

Please advise

I can walk on water when it freezes
tresB
Champion III
Champion III

A similar discussion is here: How we can create Buttons with actions in Qliksense? Please check the Qlik Branch links there.