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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

Average of a measure based on Region

Hi I have a measure that calculates TotalProducts and I would like to now calculate Average([TotalProducts]) based on Region column. Can someone please help on how to get this. Please see below measure calculation

 

CALCULATE( CALCULATE( DISTINCTCOUNT( 'Product'[ProductNumber] ), FILTER( 'Product', ISBLANK( 'Product'[Modified Date]) = FALSE() ),
USERELATIONSHIP(DateTable[Date], 'Product'[Created Date]))+0)
 
When I do Average([TotalProducts]) - gives me error that TotalProducts cannot be used in this expression
 
1 ACCEPTED SOLUTION

Hi @Anonymous,

 

OK, please try this.

 

Measure = SUMX(ALLSELECTED(Table1),[RegionCount])/[RegionCount]

If you still need help, please share more data sample which could reproduce your scenario and share the formula which is related so that we could help further on it.

 

Best Regards,

Cherry

Community Support Team _ Cherry Gao
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

6 REPLIES 6
Ashish_Mathur
Super User
Super User

Hi,

 

Try this measure

 

=AVERAGEX(VALUES(Product[Region]),[TotalProducts])


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
v-piga-msft
Resident Rockstar
Resident Rockstar

Hi @Anonymous,

 

For your requirement, you could try the quick measure in Power BI firstly.

 

quick measure.PNG

 

If you still need help, please share some data sample and your desired output so that we could help further on it.

 

Best  Regards,

Cherry

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Hi Thanks for your reply. I have tried Averagex and Quick Measure already. What I need is as below

 

Contact_address1_cityRegionCountAverageCalc
NULL55352.312195 =12798/5535
London125210.22204 =12798/1252
HIGH WYCOMBE55423.10108 =12798/554
GLASGOW61920.67528 
NOTTINGHAM61120.94599 
Bristol52824.23864 
BIRMINGHAM51524.85049 
KING24951.39759 
sunderland46027.82174 
NEWCASTLE UPON TYNE45728.00438 
LEEDS43729.28604 
WREXHAM43029.76279 
SHEFFIELD39332.56489 
LIVERPOOL39032.81538 
Manchester36834.77717 
TotalProducts12798  

Hi @Anonymous,

 

What about this measure?

 

Measure =
CALCULATE ( SUM ( Table1[RegionCount] ), ALLSELECTED ( Table1 ) )
    / CALCULATE ( SUM ( Table1[RegionCount] ) )

 

Best Regards,

Cherry

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

@v-piga-msft

 

RegionCount is a measure so wouldn't allow me to place the measure. Requires column.

Hi @Anonymous,

 

OK, please try this.

 

Measure = SUMX(ALLSELECTED(Table1),[RegionCount])/[RegionCount]

If you still need help, please share more data sample which could reproduce your scenario and share the formula which is related so that we could help further on it.

 

Best Regards,

Cherry

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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
Top Kudoed Authors