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
michaedcarrell
New Member

Creating Measure - Conditional Average

Hey Everyone,

 

Need help with this for a class. I am trying to create a conditional average to tell the average enrollment over the total number of years given that a school "Type" is "Independent". 

 

So far what I've got is: Measure = if(CollegeInfo[Type] = "Independent", AVERAGE(Enrollment2[Enrollment])) however this is giving me the error : A single value for column 'Type' in table 'CollegeInfo' cannot be determined. This can happen when a measure formula refers to a column that contains many values without specifying an aggregation such as min, max, count, or sum to get a single result.

 

Any help on this would be greatly appreciated!

1 ACCEPTED SOLUTION
dilumd
Impactful Individual
Impactful Individual

Try below,

 

Measure = CALCULATE(AVERAGE(Enrollment2[Enrollment]),FILTER(CollegeInfo,CollegeInfo[Type] = "Independent"))

View solution in original post

4 REPLIES 4
dilumd
Impactful Individual
Impactful Individual

Try below,

 

Measure = CALCULATE(AVERAGE(Enrollment2[Enrollment]),FILTER(CollegeInfo,CollegeInfo[Type] = "Independent"))

Worked like a charm. Thank you!

michaedcarrell
New Member

Hey Everyone,

 

Trying to create a measure in Power BI for a class. This measure needs to be an Average for school a "Type" which is "Independent" over several years (2011, 2012, 2013, 2014, 2015, 2016). I have quite a bit of experiance in Excel but am stuck in thinking of cell specific references instead of being able to code in columns. 

 

I have been able to come up with =if(CollegeInfo[Type] = "Independent",Avereage(Enrollement2[Enrollment]))

 

Off this though I am getting this error: A single value for column 'Type' in table 'CollegeInfo' cannot be determined. The can happen when a measure formula refers to a column that contains many values without specifying an aggregation such as min, max, count, or sum to get a single result.

 

Most likely it's something simple I haven't delt with yet but regardless need help finding a fix for this. 

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.