Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Highlighted
suryaa30
Contributor II

error in expression ')' expected qlikview

The below expression in chart gives error. The syntax in expression editor does not throw any error.

Can someone suggest what needs to be tweaked in below expression

= IF($(eGrowthAvgPremium_CYvsPY)<1,'qmem://ImageName/RedArrow',IF(1<$(eGrowthAvgPremium_CYvsPY)<=$(eGrowthGoalSales_CYvsPY),'qmem://<bundled>/BuiltIn/minus.png',IF($(eGrowthAvgPremium_CYvsPY)>$(eGrowthGoalSales_CYvsPY),'qmem://ImageName/GreenArrow')))

err.PNG

Expressions when evaluated by parts work fine.

eGoalSalesCY=Sum({< GoalSales_Year = {'$(=Max(GoalSales_Year))'} >} Goals)

eGrowthGoalSales_CYvsPY=(($(eGoalSalesCY) / $(eGoalSalesPY))-1)

eGrowthAvgPremium_CYvsPY=($(eAvgPremiumCY)/$(eAvgPremiumPY)-1)

1 Solution

Accepted Solutions

Re: error in expression ')' expected qlikview

May be this

If($(eGrowthAvgPremium_CYvsPY) < 1,'qmem://ImageName/RedArrow',

If(1 < $(eGrowthAvgPremium_CYvsPY) and $(eGrowthAvgPremium_CYvsPY) <= $(eGrowthGoalSales_CYvsPY), 'qmem://<bundled>/BuiltIn/minus.png',

If($(eGrowthAvgPremium_CYvsPY) > $(eGrowthGoalSales_CYvsPY), 'qmem://ImageName/GreenArrow')))

View solution in original post

9 Replies
vishsaggi
Esteemed Contributor III

Re: error in expression ')' expected qlikview

= IF($(eGrowthAvgPremium_CYvsPY)<1,'qmem://ImageName/RedArrow',

  IF(1 < $(eGrowthAvgPremium_CYvsPY)<=$(eGrowthGoalSales_CYvsPY),'qmem://<bundled>/BuiltIn/minus.png',IF($(eGrowthAvgPremium_CYvsPY)>$(eGrowthGoalSales_CYvsPY),'qmem://ImageName/GreenArrow')))


Can you rectify the one highlighted in the red.

Re: error in expression ')' expected qlikview

May be this

If($(eGrowthAvgPremium_CYvsPY) < 1,'qmem://ImageName/RedArrow',

If(1 < $(eGrowthAvgPremium_CYvsPY) and $(eGrowthAvgPremium_CYvsPY) <= $(eGrowthGoalSales_CYvsPY), 'qmem://<bundled>/BuiltIn/minus.png',

If($(eGrowthAvgPremium_CYvsPY) > $(eGrowthGoalSales_CYvsPY), 'qmem://ImageName/GreenArrow')))

View solution in original post

mostwanted123
Contributor

Re: Error in Expression

Hi Surya,

Try this,

If($(eGrowthAvgPremium_CYvsPY)<1,'qmem://ImageName/RedArrow',if($(eGrowthAvgPremium_CYvsPY)<=$(eGrowthGoalSales_CYvsPY),'qmem://<bundled>/BuiltIn/minus.png',if($(eGrowthAvgPremium_CYvsPY)>$(eGrowthGoalSales_CYvsPY),'qmem://ImageName/GreenArrow')))

Regards,

Pratik

suryaa30
Contributor II

Re: error in expression ')' expected qlikview

Hi Vishwarath,

I am sorry I am not able to interpret what has to be changed??

vishsaggi
Esteemed Contributor III

Re: error in expression ')' expected qlikview

As suggested by Sunny in his reply, do like 1 < yourvariablename AND yourvariablename <= variablename.

suryaa30
Contributor II

Re: error in expression ')' expected qlikview

Hi All I understand <1 condition is causing the error but what is wrong in the syntax. can someone please elaborate?

hari8088
Contributor

Re: error in expression ')' expected qlikview

Not sure but look it once on marked one with blue

IF($(eGrowthAvgPremium_CYvsPY)<1,'qmem://ImageName/RedArrow',IF(1<$(eGrowthAvgPremium_CYvsPY)<=$(eGrowthGoalSales_CYvsPY),'qmem://<bundled>/BuiltIn/minus.png',IF($(eGrowthAvgPremium_CYvsPY)>$(eGrowthGoalSales_CYvsPY),'qmem://ImageName/GreenArrow')))



Re: error in expression ')' expected qlikview

If condition in qlik cannot be like this

A < x < B... instead you need like this

A < x and x < B

suryaa30
Contributor II

Re: error in expression ')' expected qlikview

Thanks Much Sunny