Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
i am wondering why this simple expression is not working
if(category='NSAs',1,0)
this category is available. Any suggestion? Thanks
Where are you carrying this out? Script or front end?
Hi,
it is might be because of space or case sensitive.
use wildmatch() or match()
like below
if(wildmatch(trim(category),'NSAs'),1,0)
Regards
What do you mean by "not working"? Is it returning nothing at all? Or just the wrong values? Or always the same value?
Do not use this code as a chart expression. Because of the possible aggregation of rows, field category may carry multiple values. Even if you cannot see some of them...
Condition fails shows 0 always but the values in the category exist
Are you sure, The category has same Name NSAs. Because, If condition consider as Case Sensitive. Could be the case, You have only one which the value
Or else you may explain more on this
What you can do is try the following:
Best,
Peter