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
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 |
Hi,
Please show the expected result very clearly.
@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 )
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.
@bammyd is this what you are looking for?
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.
Hello parry2k ,
Yes, this is what I want but I don't see any measures to calculate it.
Check out the October 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
112 | |
112 | |
105 | |
94 | |
58 |
User | Count |
---|---|
174 | |
147 | |
136 | |
102 | |
82 |