Forum Discussion
PPStar
Helper V
3 years agoSubtract from next row
Hello. I have the following (summarised table) in power bi Date | QTY | Order | Measure 1 1/1/23 | 12 | 56 | 44 1/1/23 | 10 | 47 | 37 ...
- 3 years ago
Hi PPStar ,
According to your description, here's my solution:
Measure = MAXX ( ALL ( 'Table' ), 'Table'[Order] ) - SUMX ( FILTER ( ALL ( 'Table' ), 'Table'[Order] >= MAX ( 'Table'[Order] ) ), 'Table'[QTY] )Get the correct result:
I attach my sample below for your reference.
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Best regards,
Community Support Team_yanjiang
v-yanjiang-msft
Community Support
3 years agoHi PPStar ,
According to your description, here's my solution:
Measure =
MAXX ( ALL ( 'Table' ), 'Table'[Order] )
- SUMX (
FILTER ( ALL ( 'Table' ), 'Table'[Order] >= MAX ( 'Table'[Order] ) ),
'Table'[QTY]
)
Get the correct result:
I attach my sample below for your reference.
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Best regards,
Community Support Team_yanjiang