March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
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.10 instead of total value displayed in third row.
Thanks in advance.
Best Regards,
Diksha Gupta
Solved! Go to Solution.
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"
)
Hi @Anonymous ,
Your two numbers exceed the computational accuracy of Power BI Desktop. I have therefore shortened it a little and added a calculated column for calculation.
Subtract =
IF (
HASONEVALUE ( 'Table'[Sens Montant] ),
MIN ( 'Table'[Value] ),
SUMX ( 'Table', 'Table'[Value] * 'Table'[Value Type] )
)
With kind regards from the town where the legend of the 'Pied Piper of Hamelin' is at home
FrankAT (Proud to be a Datanaut)
Hi Frank,
Thank you for replying. How did you calculate value type column? Could you pls tell it?
Regards
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"
)
Hey It worked but why is It 0.13 instead of 0.10?
Thank you
Hi , Thank you for replying.
The formula suggested by you is not working fine. Could you please suggest something else instead?
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
114 | |
76 | |
57 | |
52 | |
44 |
User | Count |
---|---|
164 | |
116 | |
63 | |
57 | |
50 |