Forum Discussion
Sum up hierarchy not working (with sample)
- 2 years ago
hi MagikJukas
Please see if this is what you want, As the below post said, I wonder why would you do that.
Measure 2 = SWITCH(TRUE(),ISINSCOPE(Forecast[Material]), ABS(([FCST Acc.])-CALCULATE([FCST Acc.],REMOVEFILTERS(Forecast[Series],Forecast[Material]))))Measure 3 =VAR _SelSeries = SELECTEDVALUE(Forecast[Series])VAR _FCSTAccTotal = CALCULATE([FCST Acc.],REMOVEFILTERS(Forecast[Series],Forecast[Material]) )VAR _Sum = SUMX(VALUES(Forecast[Material]), ABS([FCST Acc.] - _FCSTAccTotal) )RETURN SWITCH(TRUE(),NOT(ISINSCOPE(Forecast[Material])) && ISINSCOPE(Forecast[Series]), _Sum) - 2 years ago
Hello talespin
thanks for your reply.
Indeed, your solution work with the sample I provided.
However, when testing in the original dataset, it was not working.
the solution was to change
REMOVEFILTERS(Forecast[Series],Forecast[Material])
with
REMOVEFILTERS(Forecast[Material]),ALLSELECTED(Forecast))
By doing so, the measure keeps the selected filters expect for the Material, which is what I wanted.
thanks!
Hello Anonymous , thank you for your reply.
I see this as an option. However, I wish to find a solution without creating a new table.
Isn't it possible to solve it with a some kind of measure?
thanks
Hi MagikJukas ,
Since you're using a MEASURE on top of your matrix, and it doesn't seem feasible to use a MEASURE to get the sum of the children of another MEASURE and display it on the parent, you can apply the steps above.
Best regards,
Albert He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
- MagikJukas2 years ago
Resolver III
ok, although I find it strange it is not possible.
let's see if the community finds an alternative solution.
thanks!