This is best Fabric, Power BI, SQL and AI community event. How do we know? The last event sold out! Save €200 with code FABCMTY200.
Register nowA new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.
Hello! I am new to PowerBi. I need help to know which formula to occupy so that the difference between 2 variable numbers of a calculation is always shown in positive value. Since if I use "calculate" in the case that the second value is greater than the first, obviously it returns a negative number as a result. How can I make the result that I always subtract in second place from the number with the lowest value and show me the name of who that difference corresponds to. I clarify that the calculation will always be performed only between two values. Thanks!
Solved! Go to Solution.
Hey @luistiscornia ,
you can use the ABS function to get the absolute number (the positive number) of a value.
So if it's 715 it will return 715 and if it's -715 it will return 715.
You can use that with your CALCULATE function:
MyMeasure = ABS( CALCULATE( ... ) )
Hi @luistiscornia ,
Does your problem have been solved? If it is solved, please mark a reply which is helpful to you.
If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
Hey @luistiscornia ,
you can use the ABS function to get the absolute number (the positive number) of a value.
So if it's 715 it will return 715 and if it's -715 it will return 715.
You can use that with your CALCULATE function:
MyMeasure = ABS( CALCULATE( ... ) )
Another option is to simply format the measure to not show the negative sign by changing the custom format to show positive and negative values the same.
Check out the May 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 28 | |
| 23 | |
| 23 | |
| 19 | |
| 17 |
| User | Count |
|---|---|
| 49 | |
| 47 | |
| 40 | |
| 21 | |
| 19 |