Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Reits
Regular Visitor

Sumx calculation per row between 2 tables

Hi all,

 

I want to calculate a difference per ROW rather than the TOTAL by subtracting values from 2 seperate tables. 

I thought using SUMX would help me rather than SUM.

 

Absolute Error = ABS(SUMX(Actuals;Actuals[Actuals]-SUMX('L2 forecasts';'L2 forecasts'[Forecast Qty]))).

 

However, the number I get is very high. I have tried using CALCULATE and VALUE functions but I'm not getting there. If I change from subtracting to adding up, the number barely changes.

 

Anyone any idea?

 

1 ACCEPTED SOLUTION

I found the solution.. the formula works as the relationship is established. However I had to create a new column for the calculation, not a new measure! Thanks for your advice 🙂

View solution in original post

3 REPLIES 3
v-yulgu-msft
Microsoft Employee
Microsoft Employee

Hi @Reits,

 

Do you mean the 2 seperate tables are not related with each other? If so, with above formula, you will get the total values across entire table with SUMX rather than per row. That is why the number you get is very high.

 

As Floriankx suggested, please generate relationship between two tables.

 

Regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

I found the solution.. the formula works as the relationship is established. However I had to create a new column for the calculation, not a new measure! Thanks for your advice 🙂

Floriankx
Solution Sage
Solution Sage

Hello,

 

you need to relate the tables

and use something like Absolute Error:= ABS(SUMX(Actuals;Actuals[Actuals]-Related('L2 forecasts'[Forecast Qty]))).

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors