Discussion Board for collaboration on QlikView Layout & Visualizations.
I am developing multi-tab report in Qlikview 11. I want to create a generic code which I can use at multiple places like below.
I have input box in which I am setting currency_var (GBP,USD etc)
I created variable as
Variable : Currency_Rate
=if( currency_var = 'USD', 50, if ( currency_var = 'GBP' , 79,0))
and used that variable in expression of my pivot chart. as below
Expression : Amount
= sum( Revenue * Currency_Rate)
But it shows 0 when I put the variable. But if I replace my definition in expression to
=sum( Revenue * if(currecy_var = 'USD',50,if( currency_var = 'GBP', 79,0)) )
then it works. I want to reuse the "Currency_rate" definition at many places so that whenever factor is changed I can just change variable and get effect across all such expressions implemented in document.
any ideas ?
Thanks in advance
Go to Solution.
First, create the variable without a leading = sign (so that you save the expression rather than the result)
Second, your expression should read
=Sum(Revenue * $(Currency_Rate))
or (if that does not work
=Sum(Revenue * $(=$(Currency_Rate)))
Hope that helps
try this :
= sum( Revenue * $(Currency_Rate))
Thanks Jonathan, Ioannis.. It worked !!!