cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper V
Helper V

SUM With Multiple Filters

Hi,

I have Table with Category, Month and Value:

CategoryMonthValue
WJan1
XJan1
YJan0
ZJan3

 

I want a measure that tells me what the sum of Value is for just the W and X, so for January the total would be 2. I thought I could use:

CALCULATE(SUM('Table'[Value]), 'Table'[Category] = "W", 'Table'[Category] = "X")

 

But this comes back blank. What am I missing?

 

Thanks,

1 ACCEPTED SOLUTION
Super User II
Super User II

Hello @SKH19

measure should be:

10-09-_2020_22-24-26.png

Sum of W or X = 
CALCULATE(
    [Sum of Value],
    'Table'[Category] = "W" || 'Table'[Category] = "X"
)

With kind greetings from the city where the legend of the 'Pied Piper de Hamelin' is at home
FrankAT (Proud to be a Datanaut)

View solution in original post

1 REPLY 1
Super User II
Super User II

Hello @SKH19

measure should be:

10-09-_2020_22-24-26.png

Sum of W or X = 
CALCULATE(
    [Sum of Value],
    'Table'[Category] = "W" || 'Table'[Category] = "X"
)

With kind greetings from the city where the legend of the 'Pied Piper de Hamelin' is at home
FrankAT (Proud to be a Datanaut)

View solution in original post

Helpful resources

Announcements
secondImage

Happy New Year from Power BI

This is a must watch for a message from Power BI!

December Update

Check it Out!

Click here to read more about the December 2020 Updates!

Community Blog

Check it Out!

Click here to read the latest blog and learn more about contributing to the Power BI blog!

Get Ready for Power BI Dev Camp

Get Ready for Power BI Dev Camp

Mark your calendars and join us for our next Power BI Dev Camp!.

Top Solution Authors
Top Kudoed Authors