Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a expression used in chart.
=if(Match(AD_ID,5001,5032),'KEY Cnt',
only(if(match((AD_ID,>=5004 and <=5019) and (AD_ID,>=5035 and <=5050)),'Prnt Key','TER'))
Could someone tell me what's the error in this expression?
Thanks.
Hi Gtripathy,
You can achieve by both ways If Else and Match statements. but for Match() you can't give '<=' or '>'... you have to mention all ID but you can create a Variable and make Dynamic Chart for the same.
something like:
=if(Match(AD_ID,$(vVar1)),'KEY Cnt',
if(Match(AD_ID,$(vVar2)),'Prnt Key','TER'))
Please find the Attachment may be helpful .
A quick look finds:
AD_ID,>=5004 // remove comma after AD_ID and similarly from AD_ID,>=5035 as well.
Hi Tresesco,
Thanks for quick reply.I have tried that before.but still there is some error in the expression.
Hi,
Try this
=if(Match(AD_ID,5001,5032),'KEY Cnt',
only(if(((AD_ID>=5004 and AD_ID<=5019) OR (AD_ID>=5035 and AD_ID<=5050)),'Prnt Key','TER'))
Hope this helps you.
Regards,
Jagan.
One more:
((AD_ID,>=5004 and <=5019) and (AD_ID,>=5035 and <=5050)) - this is logically impossible. May be you want
((AD_ID>=5004 and <=5019) OR (AD_ID>=5035 and <=5050))
Hi,
it should be OR.but the expression is still having error after the conditional statement ends,it's throwing error.:(. (AD_ID>=5035 and AD_ID<=5050)),'Prnt Key','TER'))
Add one more ')' at the last and try.
Without Match(), i can build the expression but i need match() as there are no distinct values.so two AD_ID's ll be there.so match() is a must.Please understand that.
=if(Match(AD_ID,5001,5032),'KEY Cnt',
only(if(match((AD_ID>=5004 and AD_ID<=5019) OR (AD_ID>=5035 and AD_ID<=5050)),'Prnt Key','TER')))
Above is the latest expression.
Hi,
If you want to use Match() then you have to specify each individual value not >= and <=. Try like this
=if(Match(AD_ID,5001,5032),'KEY Cnt',
only(if(match(AD_ID,5004, 5005, 5006,.... 5019, 5035, 5036, ...........5050), 'Prnt Key','TER')))
Regards,
Jagan.
Could you post your example app with sample data?