Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I'm new to Qliksense, and I'm trying to figure this out for several days now... With not much success..
Here is the current situation:
sum ([Unit Price]*[Order Quantity]*IEXCHANGE/XXX)
What I'd like to do, is to have a variable that I can select the desired currency, and have the formula above calculate the total automatically, to look something like this:
EXCHANGE(Item Currency, FLAG=1)
sum ([Unit Price]*[Order Quantity]*IEXCHANGE/EXCHANGE)
In short,
I need to use a field from a table where FLAG=1 and the Item Currency is as I select manually.
Hope I was able to explain myself 🙂
To get the flagged value for a specific currency set in a variable vCurrency:
Load * INLINE [
Currency, Rate, Flag
USD, 3.2, 1
USD, 3.2, 0
VND, 0.001, 1
VND, 0.002, 0
];
Alt(Only({<Flag = {1}, Currency = {'$(vCurrency)'} >} Rate),1)
Note - the alt() is only necessary if you don't have the currency's conversion to itself, i.e.. ILS to ILS = 1. If you don't have that, the Only() will return null, so alt() will tell it to pick out 1 instead.
Thanks a lot, I'll test it and update 🙏