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

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

Reply
bammyd
Frequent Visitor

Percentage of students with score above 60% in each course

Hello,

 

Please see the table below. I want to calculate the percentage of students with scores >= 60 for each subject or just 1 subject. I want to be able to display this percentage on a scorecard. 

 

Students

Course

Score

A1

math

55

A1

english

61

A1

french

70

B2

english

90

B2

math

85

B2

english

60

C3

french

72

C3

english

95

C3

math

90

D4

french

55

D4

english

70

D4

french

65

 

6 REPLIES 6
Ashish_Mathur
Super User
Super User

Hi,

Please show the expected result very clearly.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
parry2k
Super User
Super User

@bammyd here is the measure, I wanted to check if that is the output/calculation you are looking for:

 

Above 60 % = 
VAR __above60 = CALCULATE ( DISTINCTCOUNT ( 'Table'[Students] ), 'Table'[Score] >= 60 )
VAR __total = CALCULATE ( DISTINCTCOUNT ( 'Table'[Students] ), ALL ( ) )
RETURN
DIVIDE ( __above60, __total )

 

 

Follow us on LinkedIn and YouTube.gif to our YouTube channel

I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make effort to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

 

Visit us at https://perytus.com, your one-stop shop for Power BI-related projects/training/consultancy.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

parry2k
Super User
Super User

@bammyd is this what you are looking for?

 

parry2k_0-1651253887838.png

 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

@Ashish_Mathur This is the result I want but I can't quite figure out what measure to use.

Hi,

To your matrix, drag Course to the rows section.  Write these measures

Student count = distinctcount(data[students])

Measure = divide(calculate([Student count],score>=60),[Student count])

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Hello parry2k ,

Yes, this is what I want but I don't see any measures to calculate it.

Helpful resources

Announcements
OCT PBI Update Carousel

Power BI Monthly Update - October 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

October NL Carousel

Fabric Community Update - October 2024

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