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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Shrey03
Regular Visitor

Incorrect values using Sumx function

Hi All,

 

I have Base table - Table 1 (Screenshot below) and derived - Table 2 (Screenshot below) where SumColumn1 and SumColumn2 totals are coming correctly whereas the highlighted value sum is not coming correctly. Correct sum of that column is 8672600. DAX for the measure is present in screenshot

 

Table 1

Shrey03_2-1711479921214.png

 

Table 2

Shrey03_1-1711479248488.png

Can someone please help with the correct DAX measure?

1 ACCEPTED SOLUTION
jgeddes
Super User
Super User

You can try ...

TestNum = 
var _vTable =
SUMMARIZE(
    Sheet1,
    Sheet1[Type], Sheet1[Category],
    "_value", SUM(Sheet1[Column 2]) - SUM(Sheet1[Column 1])
)
Return
SUMX(
    _vTable,
    ABS([_value])
) * 100




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





View solution in original post

2 REPLIES 2
jgeddes
Super User
Super User

You can try ...

TestNum = 
var _vTable =
SUMMARIZE(
    Sheet1,
    Sheet1[Type], Sheet1[Category],
    "_value", SUM(Sheet1[Column 2]) - SUM(Sheet1[Column 1])
)
Return
SUMX(
    _vTable,
    ABS([_value])
) * 100




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Hi @jgeddes 

 

Thank you so much. This helped. Accepted this as a solution 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.