Forum Discussion
Anonymous
8 years agoNot applicable
Totals
New to Power BI. I have 20 students that have to take 4 classes to meet training requirements I'm trying to calcuate the percentage of students that have completed 0,1,2,3 or 4 classes Is there a ...
- 8 years ago
You need to unpivot the data in the query editor so it has the following columns
student name, class name, value
when you have these three columns, you can just drag the columns Into your report and get the total column (put value column in the values section). Then write some measures such as
classes completed = sum(table[value])
total students = distinctcount(table[student name])
0 class = divide(sumx(values(table[student name]),[classes completed]=0),[total students])
repeat for 1,2 etc
Zubair_Muhammad
8 years agoCommunity Champion
Hi Anonymous
Add the following Measure.
See the attached file as well
Percentage = COUNT ( TableName[Total] ) / COUNTROWS ( ALL ( TableName ) )