Forum Discussion
Anonymous
7 years agoNot applicable
Difference per cumulative amount
Hi, I calculate the difference saldo per month? I only have now the cumulative total saldo per month. This value increases. Thanks, Leon
- 7 years ago
Hi Anonymous
Please check below formula to get last saldo.
Column = CALCULATE ( SUM ( Table1[Saldo] ), FILTER ( Table1, Table1[Cat] = EARLIER ( Table1[Cat] ) && Table1[Index] = EARLIER ( Table1[Index] ) - 1 ) )Regards,
Anonymous
7 years agoNot applicable
I have added also an index column, does this help?
v-cherch-msft
7 years agoMicrosoft Employee
Hi Anonymous
You may try to create a column like below to get the diff.For example:
Diff =
'Table'[saldo]
- CALCULATE (
SUM ( 'Table'[saldo] ),
FILTER ( 'Table', 'Table'[index] = EARLIER ( 'Table'[index] ) - 1 )
)
Regards,
- Anonymous7 years agoNot applicable
Thanks this is a good start however the diff calculation should apply to a specific category condition for which I created a specific index
CAT Saldo Index
CAT A; 50 ; 1
CAT A; 100; 2
CAT A; 200; 3CAT B: 25; 1
CAT B: 75; 2
CAT B: 100; 3
Thanks!
- v-cherch-msft7 years agoMicrosoft Employee
Hi Anonymous
Please check below formula to get last saldo.
Column = CALCULATE ( SUM ( Table1[Saldo] ), FILTER ( Table1, Table1[Cat] = EARLIER ( Table1[Cat] ) && Table1[Index] = EARLIER ( Table1[Index] ) - 1 ) )Regards,