Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
This query gives me the nuber of students spending more tha 3 hours on heir home work.
How do I work out what the percentage is of those against the total student population?
homework_OT - this is the main dataset
homework_OT[StudentID] - all the students and their IDs are in [StudentID]
homework_OT[OT 3HRS PLUS] =1 - this is to filter out all those students that have a 1 in [OT 3HRS PLUS] to indicate that they spent more than 3 hours on their homework
What calculation will give me the % of [OT 3HRS PLUS] =1 from the total student population?
Solved! Go to Solution.
@acg , Try a measure like
CNT Homework > 3 HRS =
divide( CALCULATE (
DISTINCTCOUNT( homework_OT[StudentID]),
FILTER ( homework_OT, homework_OT[OT 3HRS PLUS] =1 )
), DISTINCTCOUNT( homework_OT[StudentID]))
or
CNT Homework > 3 HRS =
divide( Countx (FILTER (
values( homework_OT[StudentID]), calculate(sum(homework_OT[OT 3HRS PLUS])) >=1 ), [StudentID]), DISTINCTCOUNT( homework_OT[StudentID]))
@acg , Try a measure like
CNT Homework > 3 HRS =
divide( CALCULATE (
DISTINCTCOUNT( homework_OT[StudentID]),
FILTER ( homework_OT, homework_OT[OT 3HRS PLUS] =1 )
), DISTINCTCOUNT( homework_OT[StudentID]))
or
CNT Homework > 3 HRS =
divide( Countx (FILTER (
values( homework_OT[StudentID]), calculate(sum(homework_OT[OT 3HRS PLUS])) >=1 ), [StudentID]), DISTINCTCOUNT( homework_OT[StudentID]))
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
13 | |
11 | |
10 | |
8 | |
6 |
User | Count |
---|---|
13 | |
12 | |
11 | |
8 | |
8 |