Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
mymoosa
Regular Visitor

Table with multiple values error

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
2 REPLIES 2
Anonymous
Not applicable

Here is a copy of the pbix file.

 

I hope this can help.... really lost no

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.