Hi All
This is the measure i have created ... it gives me an error saying multiple values ... when i add a filter for TaskGrade. The reason for this filter is : Students in Grade 11 2021 Term 1 marks need to be analysed against Grade 10 2020 Term 4 marks.
PT1 = switch(
max('View_SBA_GLS_Per_Student_Total'[Term])
,"Term 1",0+ CALCULATE(
AVERAGE(View_SBA_GLS_Per_Student_Total[TotalWM])
,'View_SBA_GLS_Per_Student_Total'[Term]="Term 4",value('View_SBA_GLS_Per_Student_Total'[Year]) = DISTINCT('View_SBA_GLS_Per_Student_Total'[PrevYr]), value('View_SBA_GLS_Per_Student_Total'[TaskGrade]) = DISTINCT('View_SBA_GLS_Per_Student_Total'[PrevYrGr]))
,"Term 2", 0 + CALCULATE(AVERAGE(View_SBA_GLS_Per_Student_Total[TotalWM]),'View_SBA_GLS_Per_Student_Total'[Term]="Term 1")
,"Term 3",0 + CALCULATE(AVERAGE(View_SBA_GLS_Per_Student_Total[TotalWM]),'View_SBA_GLS_Per_Student_Total'[Term]="Term 2")
,"Term 4",0 + CALCULATE(AVERAGE(View_SBA_GLS_Per_Student_Total[TotalWM]),'View_SBA_GLS_Per_Student_Total'[Term]="Term 3"))
I do not know why it is bringing thru multiple values... as the PrevYr column works perfectly. Should PrevYrGr not work just the same