Forum Discussion
Anonymous
5 years agoNot applicable
Dynamic 100% stacked column chart
I hope I'm wording this correctly. I have a data request to show the percentage of students that earned a D or F on their latest report card. I want the end user to be able to use a parameter or ...
- 5 years ago
Hello @adamwakatsuki. Try this...
Percent Students With Failing Grades = VAR TotalStudents = CALCULATE( DISTINCTCOUNT(Marks[StudentID]), FILTER( ALLSELECTED(Marks), Marks[School Year] = SELECTEDVALUE(Marks[School Year]) && Marks[Term] = SELECTEDVALUE(Marks[Term]) ) ) VAR StudentTermSummary = SUMMARIZE( FILTER( ALLSELECTED(Marks), Marks[School Year] = SELECTEDVALUE(Marks[School Year]) && Marks[Term] = SELECTEDVALUE(Marks[Term]) ), Marks[StudentID], Marks[School Year], Marks[Term], "FailingGrades", CALCULATE( COUNTROWS(Marks), Marks[Mark] IN {"D", "F"} ) + 0 ) VAR StudentsWithFailingGrades = CALCULATE( DISTINCTCOUNT(Marks[StudentID]), FILTER( StudentTermSummary, [FailingGrades] >= SELECTEDVALUE('Number of Failing Grades'[Number of Failing Grades]) ) ) RETURN DIVIDE( StudentsWithFailingGrades, TotalStudents, BLANK() )I hope this helps! 🙂
Anonymous
5 years agoNot applicable
@littlemojopuppy You are awesome! I've been racking my brain for days on this.
littlemojopuppy
5 years agoCommunity Champion
Anonymous I'm going to need you to convince my wife of that! 😉
Glad I could help!