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
Anonymous
Not applicable

Sum except one cateogry

 I want sum a table but without one category, like a filter, but this expression do the opposite what i want. I think the answer is not hard but i can't find, the most close i don't understand. 

 

example without the data 3:

Category

Value

Data 1

10

Data 2

15

Data 3

9

Total 

25

I want this total 🤔

1 ACCEPTED SOLUTION
jdbuchanan71
Super User
Super User

@Anonymous 

Try it like this.

Filtered Value = 
IF ( 
    ISINSCOPE ( YourTable[Category] ), CALCULATE ( SUM ( YourTable[Value] ) ),
    CALCULATE ( SUM ( YourTable[Value] ), NOT YourTable[Category] IN {"Data 3"} )
)

jdbuchanan71_0-1676397540059.png

 

View solution in original post

1 REPLY 1
jdbuchanan71
Super User
Super User

@Anonymous 

Try it like this.

Filtered Value = 
IF ( 
    ISINSCOPE ( YourTable[Category] ), CALCULATE ( SUM ( YourTable[Value] ) ),
    CALCULATE ( SUM ( YourTable[Value] ), NOT YourTable[Category] IN {"Data 3"} )
)

jdbuchanan71_0-1676397540059.png

 

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.