Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
in my datasource i have amount in two currencies.in column amountusd,value is in usd and in column amount value in local.
now i should filter with local and usd .if user selects usd amountusd should be displayed .if local is selected amount should be displayed .
i creared inline table with field currency and with usd and local as values.
then i created 2 variables.
vcurrency=minstring(currency)
field=if(vcurrency='usd',amountusd,amount)
and in expression i have written sum({<flag='Y'>}$(field))
i am getting errror..
Please suggest.
thanks in advance.
Hi Charan,
see the example attached
1. Created variable v_currency = 1
2. Button toggles the variable value between 0 and 1
3. Chart expression = If(v_currency =1,sum(amount),sum(amountusd))
Hi Andrew,
to avoid if condition in expression i created varaibles .i dont want to use if in exprssion .
thanks..
Ok move the 'if statement' to a variable and just $ expand the variable as your expression.
Andy
i have written this way
vcurrency=minstring(currency)
field=if(vcurrency='usd',amountusd,amount)
and in expression i have written sum({<flag='Y'>}$(field))
but i am gettinf error
Can you post an example of your qvw, not sure what <flag='Y'> refers to?
Andy