Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have such variable (in Variable Overview): vCost = SUM([Cost1])+SUM([Cost2]).
I want do sth like this (in Chart Properties -> Expressions -> Definition): SUM( {<[Some dimension]={'Option1'}>} vCost) - but I see that it is not correct. So my question is how to get filtered variable?
Thanks in advance!
Monika
Hi Monika, you can change to vCost variable to:
Alt(Cost1,0)+Alt(Cost2,0)
And then you can use those expressions:
SUM({<[Some dimension]={'Option1'}>} $(vCost))
Hi Monica,
You have to add [Cost1] + [Cost2] in the variable, so without the SUM().
Greets, Halmar
Hi Monika, you can change to vCost variable to:
Alt(Cost1,0)+Alt(Cost2,0)
And then you can use those expressions:
SUM({<[Some dimension]={'Option1'}>} $(vCost))
Hi
Try like this
In variable
SUM( {<[Some dimension]={'Option1'}>} [Cost1])+SUM( {<[Some dimension]={'Option1'}>} [Cost2])
And use vCost as expression.
Or
Directly use as
SUM( {<[Some dimension]={'Option1'}>} [Cost1])+SUM( {<[Some dimension]={'Option1'}>} [Cost2]) in expression
Thanks for answer but it's too much writing as for me.
Hi ,
Its coming from same table?
If so,
You can write like this'
SUM( {<[Some dimension]={'Option1'}>} [Cost1] + [Cost2])
Hi Monica ,
dont declare variable with '=' i mean just write (SUM([Cost1])+SUM([Cost2])) like this in variable Overview(That means it will consider it as text)
& in Expression Change to vCost to $(vCost) u will get the correct ans
Yes, I know. I used '=' just to show how variable vCost looks like.
Nice to know, that if costs are from one table I can write like this. But the point is that I want to use sum of costs in many places, so I don't want to write their sum all the time.
Thanks for reply. Your answer is the best as for me - you've also showed me that I can use Alt function to avoid errors (I think that this is for that ;p).