Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hi there
I'm pretty new to PowerBI where I am currently in trouble in regard to calculating the absolute value of data fields.
My visualization currently looks like:
Product. Sales. Forecast. Dif. AbsDif
Category1 90 117 -27 27
SKU1. 1 0 1 1
SKU2 2 0 2 2
SKU3 87 117 -30 30
I have calculated/transformed the difference to absolute value, but I don't understand why the total AbsDif of the SKU's (category1) does not total 33?
Hope you can help.
I think I have solved it by using the following formula:
Ofc 🙂 @Pragati11
Hi @Anonymous ,
As you want your totals to be affected by your absolute value, you can write your measure something as below:
AbsBias = CALCULATE(ABS(SUM('Table1'[Sales])-SUM('Table2'[Forecast]))) * (-1)
Check if this helps.
Thanks,
Pragati
@Pragati11 wrote:Hi @Anonymous ,
As you want your totals to be affected by your absolute value, you can write your measure something as below:
AbsBias = CALCULATE(ABS(SUM('Table1'[Sales])-SUM('Table2'[Forecast]))) * (-1)
Check if this helps.
Thanks,
Pragati
@Pragati11 wrote:Hi @Anonymous ,
As you want your totals to be affected by your absolute value, you can write your measure something as below:
AbsBias = CALCULATE(ABS(SUM('Table1'[Sales])-SUM('Table2'[Forecast]))) * (-1)
Check if this helps.
Thanks,
Pragati
That just makes all of the values negative.
Hi @Anonymous ,
I just realised I understood your query wrong.
What do you mean by this in your statement:
I have calculated/transformed the difference to absolute value, but I don't understand why the total AbsDif of the SKU's (category1) does not total 33?
I don't understand the colored section of your comment.
This is basically the table I tried to reproduce at my end:
Where in the above table are you expecting 33 as a total?
Also see the image below, is my understanding correct based on the data you are using:
Thanks,
Pragati
In my visualization i've created i Matrix visual, where the SKU's are a part of the "Category". So the Category row is basically the total of the SKU's. Therefore the total of the AbsDif should be 33, as the category value is not relevant.
Hope you understand 🙂