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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Dan_at_TWE
Helper III
Helper III

I want to sum a column but ignore certain rows

I want to sum a column but ignore certain rows.   I know to sum only certain rows you do something like this:

 

MEASURE = CALCULATE(SUM('Table'[Values]), 'Table'[Location] = "London")

 

Let's say I want to sum the column values but EXCLUDE "London". Would this be right?  (Using a "!=" instead of "=".)

 

MEASURE = CALCULATE(SUM('Table'[Values]), 'Table'[Location] != "London")

 

 

1 ACCEPTED SOLUTION
samratpbi
Super User
Super User

Hi,

 

can you please try below:

MEASURE = CALCULATE(SUM('Table'[Values]), 'Table'[Location] <> "London")

If this helps to solve your problem, then please mark it as solution, thanks

View solution in original post

3 REPLIES 3
samratpbi
Super User
Super User

Hi,

 

can you please try below:

MEASURE = CALCULATE(SUM('Table'[Values]), 'Table'[Location] <> "London")

If this helps to solve your problem, then please mark it as solution, thanks

The solution does work as expected.  But it doesn't "float down" to the visual.  I suspect I need to look at another nesting with some of the filter functions (ALLFILTER or whatever...).   But your answer did get me to where I "thought" I needed to go. Thanks. That much closer...

Thanks. I'll give that a try.

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

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