I am using this as an exercise to learn powerpivot calculated fields. My question: is there a more efficient way to write the formula below? In Excel I'd join up SUMIFs so that's what I did here but I'm sure there must be a better way. The issue is that some classes have "A+","A",A-" etc so my formula is going to end up very long to cater for all types of pass grade.
Would it be more efficient to just add a Case When field to the SQL script to bring the data into the PowerPivot as Pass/Fail? Many thanks in advance for your advice
There are 36 students in the class who each did 3 tests. I've been asked to provide the number who passed each test.
Assessment Distinct Count of Student_ID Students who Passed
Test 1 36 34
Test 2 36 35
Test 3 36 29
The formula to determine how many students passed:
=CALCULATE(
DISTINCTCOUNT('Query 1'[Student_ID])
, FILTER('Query 1','Query 1'[GradeCode]="A")
)
+CALCULATE(
DISTINCTCOUNT('Query 1'[Student_ID])
, FILTER('Query 1','Query 1'[GradeCode]="B")
)
+CALCULATE(
DISTINCTCOUNT('Query 1'[Student_ID])
, FILTER('Query 1','Query 1'[GradeCode]="C")
)
Would it be more efficient to just add a Case When field to the SQL script to bring the data into the PowerPivot as Pass/Fail? Many thanks in advance for your advice
There are 36 students in the class who each did 3 tests. I've been asked to provide the number who passed each test.
Assessment Distinct Count of Student_ID Students who Passed
Test 1 36 34
Test 2 36 35
Test 3 36 29
The formula to determine how many students passed:
=CALCULATE(
DISTINCTCOUNT('Query 1'[Student_ID])
, FILTER('Query 1','Query 1'[GradeCode]="A")
)
+CALCULATE(
DISTINCTCOUNT('Query 1'[Student_ID])
, FILTER('Query 1','Query 1'[GradeCode]="B")
)
+CALCULATE(
DISTINCTCOUNT('Query 1'[Student_ID])
, FILTER('Query 1','Query 1'[GradeCode]="C")
)