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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

How to average by category in measure with summarized table

Hi,

I have table 1 listed below in my dataset. What I want to do is to sum all the net requirements by Destination and File Month, and then take the average of net requirements by file month for each destination.  How would I do that in a measure? The 'material' column is irrelevant to the calculation. The intermediate calculation basically sums net requirements listed in table 1 by destination and file month. The desired result averages the intermediate calculation table by destination. Thank you!

zaminamina_0-1623123419143.png

 

Here's the sample data:

DestinationFile MonthMaterialNet Requirements
GermanyJan-21A45
GermanyJan-21B98
GermanyJan-21C65
GermanyFeb-21D78
GermanyFeb-21B84
GermanyFeb-21A53
USAJan-21A96
USAJan-21B52
USAJan-21C35
USAJan-21D5
USAJan-21E48
USAJan-21F32
USAJan-21G56
USAFeb-21A35
USAFeb-21C23
USAFeb-21F98
UKJan-21D45
UKJan-21E25
UKJan-21F95
UKFeb-21G78
UKFeb-21A15
UKFeb-21C25
UKFeb-21F35
UKFeb-21B95
UKFeb-21D87

 

1 ACCEPTED SOLUTION
ryan_mayu
Super User
Super User

@Anonymous 

you can try this

Measure = 
VAR tbl=SUMMARIZE('Table','Table'[Destination],'Table'[File Month],"net",sum('Table'[Net Requirements]))
return AVERAGEX(tbl,[net])

1.PNG





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

3 REPLIES 3
ryan_mayu
Super User
Super User

@Anonymous 

you can try this

Measure = 
VAR tbl=SUMMARIZE('Table','Table'[Destination],'Table'[File Month],"net",sum('Table'[Net Requirements]))
return AVERAGEX(tbl,[net])

1.PNG





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Anonymous
Not applicable

Wow, that works perfectly, thank you!

you are welcome





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




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.

Top Solution Authors