Forum Discussion
Zkna-M
9 years agoFrequent Visitor
running sum grouped by probablity
I am trying to add a new measure that can calulate cumulative total of value of an item and summarise it on based on probablity. This is the data that I have Item Value Probablity 4 64 ...
- 9 years ago
hi friend
First, Create a new Table (Modeling Enter Data)
2. Related Both Table
3. Create a New Measure
SumValues = CALCULATE ( SUM ( Table1[Value] ), FILTER ( ALLEXCEPT ( Table1; Table1[Item] ), Table1[Probablity] >= MAX ( Probabilities[Probability] ) ) ) + 04. Ready. You can view in a Matrix
v-sihou-msft
Microsoft Employee
9 years ago
It should be "greater than" (>=) the custom porbability in filter context:
SumValue =
CALCULATE(
SUM('Item'[Value]),
FILTER( ALLEXCEPT('Item','Item'[Item]),
'Item'[Probability] >= MAX(Probablities[Probability])
)
)
+ 0
Regards,
Zkna-M
9 years agoFrequent Visitor
Sorry. my mistake. I tried changing the sign and doing again but it wasn't working.
Then I created everything from the scratch again and now it is working.
Thank you so much!