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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.