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! Learn more

Reply
zaza
Resolver III
Resolver III

DAX Sum of Absolute of other Sums without using SUMMARIZE

I'm looking for the sum of the absolute values of sums of categories.


Screen Shot 2020-09-15 at 12.45.58 PM.pngIn my dataset I have 4 categories. The value column is the SUM of the records. A simple ABS functin will return 10 in the total filed. However if you SUM up the absolutes that will return 60 just like in the last column, and this is what I am looking for.

 

 

I managed to find a solution using the SUMMARIZE function, however this is not feasable to implement for several reasons. So the question is, can this be done somehow with CALCULATE or some other functions?

Category Absolute = 
    VAR __table = 
        SUMMARIZE ( 
            'Table',
            'Table'[Category],
            "Absolute", ABS ( SUM ( 'Table'[Value] ) ) 
        )

    RETURN SUMX ( __table, [Absolute] )

 

Here is the file attached for reference, the dataset is very simple 1 table with 3 columns and 11 rows : PowerBI File 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Category Absolute =
SUMX(
    // instead of distinct you can
    // also use values
    DISTINCT( Table[Category] ),
    CALCULATE(
        ABS( SUM( Table[Value] ) )
    )
)

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Category Absolute =
SUMX(
    // instead of distinct you can
    // also use values
    DISTINCT( Table[Category] ),
    CALCULATE(
        ABS( SUM( Table[Value] ) )
    )
)

Helpful resources

Announcements
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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.