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

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.

Reply
Anonymous
Not applicable

Calculate total sum by category and add extra value to each category.

Hi, 

this time i would like to ask you to support me in following case: 


inputa table 

koooala_0-1641579588748.png

Expected table -  works well

koooala_1-1641579635745.png

Measure to improve 

koooala_2-1641579802950.png

Result of measure 

koooala_3-1641579879174.png

 

koooala_5-1641579901627.png

How to update syntax in measure to have 
calculated total sum by category and have posibilities to add extra value to each category.

Thank you in advance for your reply. 

 



1 ACCEPTED SOLUTION
AlexisOlson
Super User
Super User

My first thought was that you just need to move "+ 100" inside SUMX but that would give 407, not 307.

 

You need to iterate at the level you want to sum at (Category).

CategorySum =
SUMX (
    VALUES ( 'Table'[Category] ),
    CALCULATE ( SUM ( 'Table'[Value] ) + 100 )
)

View solution in original post

2 REPLIES 2
AlexisOlson
Super User
Super User

My first thought was that you just need to move "+ 100" inside SUMX but that would give 407, not 307.

 

You need to iterate at the level you want to sum at (Category).

CategorySum =
SUMX (
    VALUES ( 'Table'[Category] ),
    CALCULATE ( SUM ( 'Table'[Value] ) + 100 )
)
smpa01
Super User
Super User

@Anonymous  try this

Measure =
SUMX (
    ADDCOLUMNS (
        VALUES ( 'Table'[Category] ),
        "sum", CALCULATE ( SUM ( 'Table'[Value] ) ) + 100
    ),
    [sum]
)
Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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.