Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a variable with parameters like following:
vMyVariable
=Sum({$<[Condition1] = {'abc'},[Condition2] = {$1}>}$2)
now, in one instance I would like to call this variable and make it ignore Condition2 (accept also not existing values).
I could write set analysis like this:
=Sum({$<[Condition1] = {'yes'},[Condition2] = >}Sales) that would do the trick, but I cannot figure out how to use it with parameter.
vMyVariable(,Sales) returns 0
vMyVariable(*,Sales) would take only fields with any value in Condition2 and I will be missing values where Condition2 is NULL.
(Condition2 is in dimension table and doesn't exists for some lines)
Do you know any of any way how to call this parameter?
Try this expression for a variable
Sum({$<[Condition1] = {'abc'},[Condition2] = $1>} $2)
and pass a whitespase as a parameter
vMyVariable( ,Sales) or vMyVariable({'abc'},Sales)
Try this expression for a variable
Sum({$<[Condition1] = {'abc'},[Condition2] = $1>} $2)
and pass a whitespase as a parameter
vMyVariable( ,Sales) or vMyVariable({'abc'},Sales)
May be try this
=Sum({$<[Condition1] = {'abc'},[Condition2] = $1>}$2)
and then pass value like this for ignoring condition2
vMyVariable({*},Sales)
for other conditions, may be this
vMyVariable({">10"},Sales)
putting $1 without {} and calling vMyVariable( ,Sales) solved the issue.
Thanks