Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All
Just wanted to know what is the difference between $(Variable) and $(=Variable) while using them in Set Analysis
Thanks
Kushal Thakral
In this simple case it looked identically - but it isn't. The difference here is where the variable-content will be evaluated. By $(=Variable) is it inside from the $-sign expansion and $(Variable) will be evaluated within the field respectively expression in which it is embedded.
The best explanation will you find within the link above and here: The Magic of Variables.
- Marcus
Hi Marcus
I have checked if you use =$(Variable) in a text object or =$(=Variable), both are giving same result
i have defined Variable value 1+2 in variable overview.
Regards
Kushal Thakral
PFA document
Vikas
Have also a look at
and the comments below this blog post.
I think the example using simple arithmetic is also not the best example, compare an aggregation like Max(Date) put into a variable and expanded in e.g. a chart dimensional context.
In this simple case it looked identically - but it isn't. The difference here is where the variable-content will be evaluated. By $(=Variable) is it inside from the $-sign expansion and $(Variable) will be evaluated within the field respectively expression in which it is embedded.
The best explanation will you find within the link above and here: The Magic of Variables.
- Marcus
Simply put the difference is where the expression is evaluated:
$(Variable)
returns the expanded variable, which may then be evaluated by the expression. May be evaluated many times in a table.
$(=Variable)
evaluates the expression in the variable, and the value is returned. Evaluated once in a table or chart.
It is similar to the difference between a variable defined without a leading equals sign, or with a leading equals sign
EDIT - beaten to the punch by Marcus.
Thank You All for your replies.
Regards
Kushal Thakral
Hi,
Thanks. It has been very useful to me.
Can anybody explain how the following expression perform on the run-time
vCompare = $(=If($(vTYMTDSales) - $(vLYMTDSales) > 0,0,1))
vCompare = =If($(vTYMTDSales) - $(vLYMTDSales) > 0,0,1)