Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago

Dynamic weighted average?

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

(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