Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
i use qlik sense November Relase, use Mashups and the JS API.
I create a qvf with two variables:
LET var_Currency = 'EUR';
LET varSum_Amount = 'Sum({$<Currency={"$(varCurrency)"}}>} Amount)';
Now i create a Textfield:
Fx:
='var_Currency:' & var_Currency & CHR(13) &
'varSum_Amount:' & varSum_Amount & ':' & $(varSum_Amount) & CHR(13)
The Amount will be calculated for EUR.
BUT:
When i changed the value of "var_Currency" to "GBP" with Engine API Explorer or JS API the value of Variable "varSum_Amount" does not changed. The value of var_Currency changes to GBP.
Did anyone know how to solve this?
Thanks for any help!
Regards
you mean you need to use parameterized variables?
then you might use something like this:
set varSum_amount = sum({<currency={$1}>} Amount);
on the chart you reference it as $(varSum_amount('EUR'))
May be GBP is not the correct Word. This should be case sensitive
you mean you need to use parameterized variables?
then you might use something like this:
set varSum_amount = sum({<currency={$1}>} Amount);
on the chart you reference it as $(varSum_amount('EUR'))
In the varSum_Amount expression, the variable is referred to without underscore, but in the LET definition it does use an underscore. Is it a typo or could be the issue?
Hi, no. GBP is the correct spelling.
Thats a typo. sry. no that is not the problem
Hi,
you are me hero! Thank you very much. This works!
i dont know that parameterized variables are possible until now. Nice feature!
I solved it like this:
Skript:
LET var_Currency_param = 'EUR';
LET varSum_Amount_param = 'Sum({$<Currency={$1}>} AmountAuth)';
Textbox:
& '****PARAM***' & CHR(13)
& 'var_Currency_param:' & var_Currency_param & CHR(13)
& 'varSum_Amount_param: ' & varSum_Amount_param & ':' & $(varSum_Amount_param($(var_Currency_param))) & CHR(13)
When i changed the variable "var_Currency_param" with Enigne API Explorer the value will be recalculated.
Thank you.
Best Regards