Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All
I have a variable that I created and I'm using it on a straight table as part of an expression, but it's not returning any value.
IF(SaleType1 = 'Total SBIB Sales Penetration',$(vTotal)
How do I evaluate a variable in an if statement? Please assist.
Thank you
May be you can use $1 in your variable expression and then pass the value of SalesType1 -
For Example -
vTotal = Sum(Sales) then you can replace it by Sum({<$1>}Sales) or Sum({<SaleType1 = {$1}>}Sales)
And then the expression (If using second expression)- $(vTotal('Total SBIB Sales Penetration'))
IF(SaleType1 = 'Total SBIB Sales Penetration',$(vTotal)
you missed the ) at last and check your sales type1 value it is matched or not with your existing data
Hi Neelam. Thank you but I'm not understanding the example you gave me. Are you saying I should create a variable for Total SBIB Sales Penetration then call the variable in the expression? I'm being confused by $1 part in your comment. Can you please elaborate further. Thanks
Hi Manoj, It's still not working. Thanks
Try this
IF(SaleType1 = 'Total SBIB Sales Penetration',"$(=vTotal)")
or
IF(SaleType1 = 'Total SBIB Sales Penetration','$(=vTotal)')
can you share the variable definition
Check this resource for parameters in set analysis -
So the $1 is like defining the parameters where you can supply the values later while using the variable.
Thank you very much Neelam, this is really helpful.
Thank you guys, but nothing is working. So in the meantime I created same variable twice, one with an = mark and the other without as I'm using them on different objects.