topic How do I calculate % of students making progress on goals that are categorized in Desktop
https://community.powerbi.com/t5/Desktop/How-do-I-calculate-of-students-making-progress-on-goals-that-are/m-p/1784983#M697825
<P>I am managing a program where we are tracking student progress on goals and want to know the % of students that are making progress. They are scored daily on each goal. I have a SQL table that lists each student, their goals, the category associated with the goal and the monthly average score.</P><P>My first step was to determine if a student is making progress on a specific goal.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="laura_ESNH_0-1618412211597.png" style="width: 400px;"><img src="https://community.powerbi.com/t5/image/serverpage/image-id/494712iABE86CA809B637BC/image-size/medium?v=v2&px=400" role="button" title="laura_ESNH_0-1618412211597.png" alt="laura_ESNH_0-1618412211597.png" /></span></P><P>I did this by creating calculated measures for their initial goal score:</P><P>Initial Goal Score = CALCULATE(MAX('Outcome YTSGoalNeedTracking'[AverageScore]), FILTER(ALL('Outcome YTSGoalNeedTracking'[DateServiceProvidedFirst].[Date]), 'Outcome YTSGoalNeedTracking'[DateServiceProvidedFirst].[Date] = MIN('Outcome YTSGoalNeedTracking'[DateServiceProvidedFirst])))</P><P>Their latest goal score:</P><P>Final Goal Score = CALCULATE(MAX('Outcome YTSGoalNeedTracking'[AverageScore]), FILTER(ALL('Outcome YTSGoalNeedTracking'[DateServiceProvidedFirst].[Date]), 'Outcome YTSGoalNeedTracking'[DateServiceProvidedFirst].[Date] = MAX('Outcome YTSGoalNeedTracking'[DateServiceProvidedFirst])))</P><P>I then created two additional calculated measures with IF statements to identify students that have made progress, one for a Yes/No that displays in the table above and the other with a 1/0 for counting.</P><P>Goal Progress Made (Y/N) = IF('Outcome YTSGoalNeedTracking'[Final Goal Score] > 'Outcome YTSGoalNeedTracking'[Initial Goal Score], "Yes", "No")</P><P>Goal Progress Made (1/0) = IF('Outcome YTSGoalNeedTracking'[Final Goal Score] > 'Outcome YTSGoalNeedTracking'[Initial Goal Score], VALUE("1"), VALUE("0"))</P><P>I have been able to successfully calculate the % of students making progress for each goal as displays in the table below:</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="laura_ESNH_1-1618412211601.png" style="width: 532px;"><img src="https://community.powerbi.com/t5/image/serverpage/image-id/494713i7FC375068A8783DE/image-dimensions/532x125?v=v2" width="532" height="125" role="button" title="laura_ESNH_1-1618412211601.png" alt="laura_ESNH_1-1618412211601.png" /></span></P><P>I did this by creating a calculated measure to count the number of students assessed on a goal<BR />No. Students Assessed = CALCULATE(DISTINCTCOUNT('Outcome YTSGoalNeedTracking'[ID]), 'Outcome YTSGoalNeedTracking'[AverageScore] > 0)</P><P>In order to get a sum of the total students that made progress, I created a table of the student IDs -- Student List = VALUES('Outcome YTSGoalNeedTracking'[ID] -- and created a relationship between the two tables with the ID. I then used SUMX to get a total of the students that made progress. </P><P>Goal Progress Made Sum = SUMX(VALUES('Student List'[ID]), 'Outcome YTSGoalNeedTracking'[Goal Progress Made (1/0)])</P><P>After that, the % was a simple calculated measure: </P><DIV><DIV><SPAN>% Students Progress = 'Outcome YTSGoalNeedTracking'[Goal Progress Made Sum] / 'Outcome YTSGoalNeedTracking'[No. Students Assessed]</SPAN></DIV></DIV><P><STRONG>NOW FOR THE PROBLEM:</STRONG> Each of the three goals listed above are part of the “Employment” category. When I create a visual that used the category instead of the goal, the no of students assessed and the no of students with progress is not accurate.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="laura_ESNH_2-1618412211604.png" style="width: 532px;"><img src="https://community.powerbi.com/t5/image/serverpage/image-id/494711i52BE5E23DC763676/image-dimensions/532x105?v=v2" width="532" height="105" role="button" title="laura_ESNH_2-1618412211604.png" alt="laura_ESNH_2-1618412211604.png" /></span></P><P>It should be 60 students assessed, 18 with progress and 30% progress.</P><P>I’m thinking that I may need to use SUMX again. I tried building a table with the Categories (Mission Categories = VALUES('Outcome YTSGoalNeedTracking'[Category]) and then used SUMX to get a total of the students assessed in the category with:</P><P>Category No. Assessed = SUMX(VALUES('Mission Categories'[Category]), 'Outcome YTSGoalNeedTracking'[No. Students Assessed])</P><P>But the resulted in the same number of 49. I think the issues lies with the fact that some students have two goals within the same category (see ID000483 in the first image) and that the count on the number of students assessed is a distinct count on the ID -- DISTINCTCOUNT('Outcome YTSGoalNeedTracking'[ID]). I just don't know how to adjust the measures to account for this issue.</P><P>Any help would be GREATLY appreciated. I have a number of other programs that I need to do the same type of calculation.</P><P> </P>Wed, 14 Apr 2021 15:24:12 GMTlaura_ESNH2021-04-14T15:24:12ZHow do I calculate % of students making progress on goals that are categorized
https://community.powerbi.com/t5/Desktop/How-do-I-calculate-of-students-making-progress-on-goals-that-are/m-p/1784983#M697825
<P>I am managing a program where we are tracking student progress on goals and want to know the % of students that are making progress. They are scored daily on each goal. I have a SQL table that lists each student, their goals, the category associated with the goal and the monthly average score.</P><P>My first step was to determine if a student is making progress on a specific goal.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="laura_ESNH_0-1618412211597.png" style="width: 400px;"><img src="https://community.powerbi.com/t5/image/serverpage/image-id/494712iABE86CA809B637BC/image-size/medium?v=v2&px=400" role="button" title="laura_ESNH_0-1618412211597.png" alt="laura_ESNH_0-1618412211597.png" /></span></P><P>I did this by creating calculated measures for their initial goal score:</P><P>Initial Goal Score = CALCULATE(MAX('Outcome YTSGoalNeedTracking'[AverageScore]), FILTER(ALL('Outcome YTSGoalNeedTracking'[DateServiceProvidedFirst].[Date]), 'Outcome YTSGoalNeedTracking'[DateServiceProvidedFirst].[Date] = MIN('Outcome YTSGoalNeedTracking'[DateServiceProvidedFirst])))</P><P>Their latest goal score:</P><P>Final Goal Score = CALCULATE(MAX('Outcome YTSGoalNeedTracking'[AverageScore]), FILTER(ALL('Outcome YTSGoalNeedTracking'[DateServiceProvidedFirst].[Date]), 'Outcome YTSGoalNeedTracking'[DateServiceProvidedFirst].[Date] = MAX('Outcome YTSGoalNeedTracking'[DateServiceProvidedFirst])))</P><P>I then created two additional calculated measures with IF statements to identify students that have made progress, one for a Yes/No that displays in the table above and the other with a 1/0 for counting.</P><P>Goal Progress Made (Y/N) = IF('Outcome YTSGoalNeedTracking'[Final Goal Score] > 'Outcome YTSGoalNeedTracking'[Initial Goal Score], "Yes", "No")</P><P>Goal Progress Made (1/0) = IF('Outcome YTSGoalNeedTracking'[Final Goal Score] > 'Outcome YTSGoalNeedTracking'[Initial Goal Score], VALUE("1"), VALUE("0"))</P><P>I have been able to successfully calculate the % of students making progress for each goal as displays in the table below:</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="laura_ESNH_1-1618412211601.png" style="width: 532px;"><img src="https://community.powerbi.com/t5/image/serverpage/image-id/494713i7FC375068A8783DE/image-dimensions/532x125?v=v2" width="532" height="125" role="button" title="laura_ESNH_1-1618412211601.png" alt="laura_ESNH_1-1618412211601.png" /></span></P><P>I did this by creating a calculated measure to count the number of students assessed on a goal<BR />No. Students Assessed = CALCULATE(DISTINCTCOUNT('Outcome YTSGoalNeedTracking'[ID]), 'Outcome YTSGoalNeedTracking'[AverageScore] > 0)</P><P>In order to get a sum of the total students that made progress, I created a table of the student IDs -- Student List = VALUES('Outcome YTSGoalNeedTracking'[ID] -- and created a relationship between the two tables with the ID. I then used SUMX to get a total of the students that made progress. </P><P>Goal Progress Made Sum = SUMX(VALUES('Student List'[ID]), 'Outcome YTSGoalNeedTracking'[Goal Progress Made (1/0)])</P><P>After that, the % was a simple calculated measure: </P><DIV><DIV><SPAN>% Students Progress = 'Outcome YTSGoalNeedTracking'[Goal Progress Made Sum] / 'Outcome YTSGoalNeedTracking'[No. Students Assessed]</SPAN></DIV></DIV><P><STRONG>NOW FOR THE PROBLEM:</STRONG> Each of the three goals listed above are part of the “Employment” category. When I create a visual that used the category instead of the goal, the no of students assessed and the no of students with progress is not accurate.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="laura_ESNH_2-1618412211604.png" style="width: 532px;"><img src="https://community.powerbi.com/t5/image/serverpage/image-id/494711i52BE5E23DC763676/image-dimensions/532x105?v=v2" width="532" height="105" role="button" title="laura_ESNH_2-1618412211604.png" alt="laura_ESNH_2-1618412211604.png" /></span></P><P>It should be 60 students assessed, 18 with progress and 30% progress.</P><P>I’m thinking that I may need to use SUMX again. I tried building a table with the Categories (Mission Categories = VALUES('Outcome YTSGoalNeedTracking'[Category]) and then used SUMX to get a total of the students assessed in the category with:</P><P>Category No. Assessed = SUMX(VALUES('Mission Categories'[Category]), 'Outcome YTSGoalNeedTracking'[No. Students Assessed])</P><P>But the resulted in the same number of 49. I think the issues lies with the fact that some students have two goals within the same category (see ID000483 in the first image) and that the count on the number of students assessed is a distinct count on the ID -- DISTINCTCOUNT('Outcome YTSGoalNeedTracking'[ID]). I just don't know how to adjust the measures to account for this issue.</P><P>Any help would be GREATLY appreciated. I have a number of other programs that I need to do the same type of calculation.</P><P> </P>Wed, 14 Apr 2021 15:24:12 GMThttps://community.powerbi.com/t5/Desktop/How-do-I-calculate-of-students-making-progress-on-goals-that-are/m-p/1784983#M697825laura_ESNH2021-04-14T15:24:12ZRe: How do I calculate % of students making progress on goals that are categorized
https://community.powerbi.com/t5/Desktop/How-do-I-calculate-of-students-making-progress-on-goals-that-are/m-p/1787940#M698647
<P>Rethink your use of <SPAN>FILTER(ALL()) in this scenario. FILTER() is not really required since you are already inside a CALCULATE(), and ALL() removes all existing filters which is most likely not what you want. Consider using ALLEXCEPT() or similar instead.</SPAN></P>Thu, 15 Apr 2021 23:37:56 GMThttps://community.powerbi.com/t5/Desktop/How-do-I-calculate-of-students-making-progress-on-goals-that-are/m-p/1787940#M698647lbendlin2021-04-15T23:37:56Z