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

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

Reply
Anonymous
Not applicable

Calculate average of minimum by group

Hi, 

 

I'd like to obtain the average of a previously calculed measure of minimum per group. I'll give you an example:

 

StudentMarkGroup
John90A
Linda65A
Mark85A
Vanessa90B
George55B
Harry70B

 

What I'd like to obtain is, in first place: 

- The minimum mark my group (for Group A it would be 65, and for group B, 55)

- Get the average of these marks (AVERAGE(65,55)=60)

 

I thought of getting the minimum as a calculated column, as you can see here:

 

StudentMarkGroupMinimum
John90A65
Linda65A65
Marcus85A65
Vanessa90B55
George55B55
Harry70B55

 

But I came across a problem: my dashboard includes slicers and, if I want to filter by Group A and John mark, I'd like to obtain 90 instead of 65. As I have read, calculated columns are generated when data is loaded and doesn't care about slicers. 

 

So the other option is getting minimum by group as a measure and then get the average, again as a measure. The problem is, I suppose, that I can't create a measure that contains two values (the minimum for group A and the minimum for group B). In this case, how could I get my final measure: an average of minimum values by group that depends on slicers? I'm really stuck on this. 

 

Thanks for your help.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous ,

 

If you want your minimun filtered by the slicer, you may create the measure instead of the calculated column.

 

This is the Measure vs. Calculated columns blog:

 

https://www.sqlbi.com/articles/calculated-columns-and-measures-in-dax/

 

https://insightsoftware.com/blog/calculated-columns-vs-measures/

 

 

Back to your question, the following steps are my solution.

 

1.Create the Minimun measure.

Minimum = CALCULATE(MIN('Table'[Mark]),ALLEXCEPT('Table','Table'[Group]))

 

2.Create the Average measure.

Average = AVERAGEX('Table',[Minimum])

 

2.png

 

They can be filtered by the slicer.

result10271040.gif

 

 

You can check more details from here.

 

 

 

Best Regards,

Stephen Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @Anonymous ,

 

If you want your minimun filtered by the slicer, you may create the measure instead of the calculated column.

 

This is the Measure vs. Calculated columns blog:

 

https://www.sqlbi.com/articles/calculated-columns-and-measures-in-dax/

 

https://insightsoftware.com/blog/calculated-columns-vs-measures/

 

 

Back to your question, the following steps are my solution.

 

1.Create the Minimun measure.

Minimum = CALCULATE(MIN('Table'[Mark]),ALLEXCEPT('Table','Table'[Group]))

 

2.Create the Average measure.

Average = AVERAGEX('Table',[Minimum])

 

2.png

 

They can be filtered by the slicer.

result10271040.gif

 

 

You can check more details from here.

 

 

 

Best Regards,

Stephen Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

@Anonymous , Not very clear , Try a measure like

 

AverageX(values(Table[Group]), calculate(min(Table[Mark]), filter(allselected(Table), Table[Group] = max(Table[Group]))))

or

 

AverageX(values(Table[Group]), calculate(min(Table[Mark]), filter(all(Table), Table[Group] = max(Table[Group]))))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

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.