Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
BARC’s The BI Survey 19 makes it official. BI users love Qlik. GET REPORT
dandaanilreddy
Contributor III

Variable not working in expression

Hello All,

I am facing issue with a variable in my expression. Even if i hard code the value for the scenario my expression is not working. When ever i comment the scenario part the expression is working fine. . I want to compare 2 scenarios based on the selections. Scenario 1 and scenario 2. For this i have added the 2 scenario variables as dimensions and the below expression. Please can someone look into this?

num(Sum(if(right(IAC,2)='A1',
if(Scenario={'$(vScenario1)'},
if(right(business,5)='Ratio',value*100,
value))))/Unit_Value,'$(vDecimal)')

 

Thanks

 

 

1 Reply
Partner
Partner

Re: Variable not working in expression

'{}' is not required in if statement.

Try:

num(Sum(if(right(IAC,2)='A1',
if(Scenario=$(vScenario1),
if(right(business,5)='Ratio',value*100,
value))))/Unit_Value,'$(vDecimal)')

Check also if your variable has '=' at the beginning .