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
The_Clam
Helper I
Helper I

I need help with calculating percentages by category

Hi. I am having trouble trying to calculate percentages for the number of tickets under 4 hours by Severity. So, for Moderate, there are 2 out of 5 tickets under 4 hours for 40%.  What is the best way to accomplish this in Power BI?  Please help.  Thanks!

Ticket IDSeverityTime to Resolve (hours)
3621Moderate8
4775Critical50
5557Moderate1
6604High3
8191Moderate20
7222High1
8377High2
9876Moderate3
4432High0
1551Moderate10

 

Expected result 
  
Critical0.00%
High100%
Moderate40%
1 ACCEPTED SOLUTION
Vera_33
Resident Rockstar
Resident Rockstar

Hi @The_Clam 

 

Try a DAX measure

 

Vera_33_0-1614739644086.png

Measure = 
COALESCE (
    COUNTROWS ( FILTER ( 'Table', 'Table'[Time to Resolve (hours)] < 4 ) )
        / COUNTROWS ( 'Table' ),
    0
)

 

View solution in original post

2 REPLIES 2
Vera_33
Resident Rockstar
Resident Rockstar

Hi @The_Clam 

 

Try a DAX measure

 

Vera_33_0-1614739644086.png

Measure = 
COALESCE (
    COUNTROWS ( FILTER ( 'Table', 'Table'[Time to Resolve (hours)] < 4 ) )
        / COUNTROWS ( 'Table' ),
    0
)

 

Thanks so much!

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.