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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
Anonymous
Not applicable

Dynamic weighted average?

I have a measure containing a metric for each customer.  For example:

 

ovonel_0-1624572225609.png

 

(I added the code below for Measure)

 

 

Is it possible to get a dynamic weighted average… based on whatever segmentation is chosen at a higher level?

 

For example; If on the filters, segmentation X is chosen, (then that shall be Customer 4,6 and 45), and then  do a weighted average based on those Customers?

 

For example; If a city is seleted, (then that shall be customers 5,10 and 11), and then do a weighted average based on that?

 

(My goal is to use a matrix, and then in Rows to have Customer, and then do they weighted average, for whichever column is selected at a higher level and used as filter...)

 

 

My code for  Measure is.

 

TotalPerCustomer = SUMX(SUMMARIZE(Revenue,'Customer'[Customer]),[RevenueWo])

 

MaxBPerCustomer =  MAXX(  SUMMARIZE(Revenue, 'Customer'[Customer], 'Centers'[Bus]), [RevenueWo])

 

Measure = DIVIDE([TotalPerCustomer],[ MaxBPerCustomer],blank())

 

1 REPLY 1
amitchandak
Super User
Super User

@Anonymous , segmentation is just values or based on level.

if value

You have to create the measures for both cases with the filter of customers. And with help of an independent table create a slicer and for city and customer (like measure slicer)

 

if this is based on the level then you have to switch measures based on isinscope.

 

 

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
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 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.