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

Try your skills in the Power BI Dataviz World Championship! Round one ends June 26. Join now

Reply
AndyB87
New Member

Calculating Average Among groups

This seems like a pretty straight-forward operation, but I'm fairly new to working with data, so I don't know how to proceed. I have a table showing amino acid content for three recipes of the same product-type from a food brand. I want to create a table that returns the average of each amino acid group for two recipes in each column.

 

So for example, I want one column that shows the average Isoleucine, Tyrosine, and Lysine for recipes A and B in one column, recipes A and C in another, and recipes B and C in the third. I'm sure this problem has been solved before, but I couldn't find it. I would appreciate it if someone could point me in the right direction!

 

Here's what I'm starting with (values have been simplified for this example):

 

Amino AcidRecipeValue
IsoleucineA1
Phenylalanine-TyrosineA1
LysineA1
IsoleucineB2
Phenylalanine-TyrosineB2
LysineB2
IsoleucineC3
Phenylalanine-TyrosineC3
LysineC3

 

And here's the result I want:

 

Amino AcidAB AverageAC AverageBC Average
Isoleucine1.5

2

2.5
Phenylalanine-Tyrosine1.522.5
Lysine1.5

2

2.5

 

Thanks!

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@AndyB87 , Will this kind of measure work for you

AB Average	=calculate(average(Table[Value]),table[Recipe] in {"A","B"})
AC Average	=calculate(average(Table[Value]),table[Recipe] in {"A","C"})
BC Average=calculate(average(Table[Value]),table[Recipe] in {"C","B"})

 

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

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@AndyB87 , Will this kind of measure work for you

AB Average	=calculate(average(Table[Value]),table[Recipe] in {"A","B"})
AC Average	=calculate(average(Table[Value]),table[Recipe] in {"A","C"})
BC Average=calculate(average(Table[Value]),table[Recipe] in {"C","B"})

 

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

Yes! These measures work beautifully. Thank you!

 

Helpful resources

Announcements
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.