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

DAX SUM column based on multiple conditions

I have 2 columns: Category and Escalated

The requirement is to calculate accuracy like the below excel calculation: That is Sum of Escalated when Category is Critical or High divided by Sum of Escalated.

How do I replicate this in PBI? Please help....

 

=(SUMIF(A2:B12,"High",B2:B12)+SUMIF(A2:B12,"Critical",B2:B12))/SUM(B2:B12)

CategoryEscalated
High1
Critical1
Low0
Moderate1
High1
Moderate0
Critical1
Critical1
Low0
High0
Moderate1
1 ACCEPTED SOLUTION
tamerj1
Super User
Super User

Hi @prasadhebbar315 

please try

=
DIVIDE (
CALCULATE (
SUM ( 'Table'[Escalated] ),
'Table'[Category] IN { "High", "Critical" }
),
SUM ( 'Table'[Escalated] )
)

View solution in original post

2 REPLIES 2
tamerj1
Super User
Super User

Hi @prasadhebbar315 

please try

=
DIVIDE (
CALCULATE (
SUM ( 'Table'[Escalated] ),
'Table'[Category] IN { "High", "Critical" }
),
SUM ( 'Table'[Escalated] )
)

@tamerj1 Thanks this solution has worked

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.

Top Solution Authors