Forum Discussion
Anonymous
5 years agoNot applicable
How to calculate difference between two rows in a table?
Hi everyone, I need your help. I want to calculate the difference of Montant of C and D. Supposingly, I would like to subtract montant of C from montant of D. I want to display Difference i.e- 0....
- 5 years ago
Hey Anonymous ,
you can subtract one from the other:
Difference Montant C to D = CALCULATE( SUM( myTable[Montant] ), myTable[Sens] = "D" ) - CALCULATE( SUM( myTable[Montant] ), myTable[Sens] = "C" )If you need any help please let me know.If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍Best regardsDenisBlog: WhatTheFact.biFollow me: twitter.com/DenSelimovic
selimovd
5 years agoMost Valuable Professional
Hey Anonymous ,
you can subtract one from the other:
Difference Montant C to D =
CALCULATE(
SUM( myTable[Montant] ),
myTable[Sens] = "D"
)
- CALCULATE(
SUM( myTable[Montant] ),
myTable[Sens] = "C"
)
If you need any help please let me know.
If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍
Best regards
Denis
Blog: WhatTheFact.bi
Follow me: twitter.com/DenSelimovic
Anonymous
5 years agoNot applicable
Hi , Thank you for replying.
The formula suggested by you is not working fine. Could you please suggest something else instead?