Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I need to use a calculated dimension like monthname(datefield) as a modifier in the set expression and equate it against
monthname(AddMonths(today(),-1)) in the set expression.Please let me know how this could acheived
Hi
Try this:
Sum({<YourMonthnamefield = {"$(=monthname(addmonths(Today(),-1)))"},Year={'$(=Year(addmonths(Today(),-1)))'} >}Sales)
Regards
Aviral Nag
Why not you create monthname(datefield) as MONTHNAME_DATEFIELD
at script level, NOw use this field as modifier to equate it against
monthname(AddMonths(today(),-1))
Hi Nithin,
I understand that making it in the script would solve the issue.But, I would want to know if there is any other way to get this done
No,
In set analysis, the modifier needs to be a Field name and not the calculation... or the variable....
Hi Nithin,
so would it possible to declare the calculated dimension as a variable and use it in the set expression.I tried it but that does not seem to work
Hi
Putting the calculation in a variable makes no difference as the variable is expanded before the set expression is evaluated. So the set expression does not see the variable, it sees the calculation, and as you already know, that does not work.
HTH
Jonathan