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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Anonymous
Not applicable

Dynamic weighted average?

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

ovonel_0-1624570751679.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
edhans
Super User
Super User

You are going to have to provide data and expected results. You have 3 customers shown with a measure and size, and then want to know how to get customers 4, 6, and 45 to do something based on some new segmentation field.
How to get good help fast. Help us help you.

How To Ask A Technical Question If you Really Want An Answer

How to Get Your Question Answered Quickly - Give us a good and concise explanation
How to provide sample data in the Power BI Forum - Provide data in a table format per the link, or share an Excel/CSV file via OneDrive, Dropbox, etc.. Provide expected output using a screenshot of Excel or other image. Do not provide a screenshot of the source data. I cannot paste an image into Power BI tables.



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.