cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
New Member

Calculate percentage based on values

Hi

 

New to Power BI today so apologies if this is very basic.

 

I am trying to calculate the percentage of grades in Maths column that are 5 or above.

 

I have added a new measure for this but believe there is no countif function?

 

Thanks

 

1 ACCEPTED SOLUTION

Accepted Solutions
Microsoft
Microsoft

You can create a calculated column

grade = IF(yourTable[value]>=5,"5 or above","less than 5")

Capture.PNG

 

And then create a measure

perc above 5 = COUNTROWS(FILTER(yourTable,yourTable[value]>=5))/COUNTROWS(ALL(yourTable))

Capture.PNG

 

See more details in the attached pbix file. If you'd like more specific suggestion on your scenario, please post some sample data and expected output.

View solution in original post

3 REPLIES 3
New Member

I would also like to be able to view the records of who has that grade.

 

Thanks

Microsoft
Microsoft

You can create a calculated column

grade = IF(yourTable[value]>=5,"5 or above","less than 5")

Capture.PNG

 

And then create a measure

perc above 5 = COUNTROWS(FILTER(yourTable,yourTable[value]>=5))/COUNTROWS(ALL(yourTable))

Capture.PNG

 

See more details in the attached pbix file. If you'd like more specific suggestion on your scenario, please post some sample data and expected output.

View solution in original post

Hi, I am struggling with something very similar and hope you may be able to help. I want to present the percentage of calls answered within 20s as a gauge byt cant figure out the measure.

 

Any guidance would be great.

 

RingtimeKPI Hit
1Yes
4Yes
2Yes
4Yes
4Yes
1Yes
1Yes
2Yes
6Yes
1Yes
1Yes
1Yes
7Yes
28No
33No
22No
46No
2Yes
1Yes
3Yes

Helpful resources

Announcements
November Update

Check it Out!

Click here to read more about the November 2020 Updates!

Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

secondImage

Power Platform October Community Highlights

Check out the top community contributors across all of the communities

secondImage

Create an end-to-end data and analytics solution

Learn how Power BI works with the latest Azure data and analytics innovations at the digital event with Microsoft CEO Satya Nadella.

Top Solution Authors
Top Kudoed Authors