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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

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
FrankAT
Community Champion
Community Champion

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
FrankAT
Community Champion
Community Champion

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)

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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