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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
phesc
New Member

Dynamic weighed average time serie

I am fighiting to solve a problem: I have a time serie allowing me to compute the success rate of an operation on different regions. I would like to be able to compute the time serie of the weighed average of the success rate over a dynamic filtering on one or several regions.

e.g.

Year Total OK Region

2016 10 8 Europe

2016 15 9 Americas

2016 20 15 Asia

2017 12 10 Europe

2017 16 10 Americas

2017 18 12 Asia

 

I want to display over the time, bars per region + weighed average according to the highlighted selection in PowerBI!

The problem is on the dynamic nature of the weighed average that depends on the set of regions that are selected.

Is there a way to do this in PowerBI?

Thanks for the help!

1 ACCEPTED SOLUTION

Thanks a lot, Frank! it is almost what I was looking for and indeed your answer was close to the result I expected, even simpler : just needed to remove the filter "ALL" !

 

Success rate (%) = CALCULATE(SUM(Sheet2[OK]))/CALCULATE(SUM(Sheet2[Total]))*100

 

Indeed, it alows to demonstrate one key difference between a column and a measure: the measure is using the current context where it is used then more dynamic.

Dynamic Average

Regards,

 

Ph.

View solution in original post

2 REPLIES 2
v-frfei-msft
Community Support
Community Support

Hi @phesc,

 

To create a measure as below. If it doesn't meet your requirement, kindly share your excepted result to me.

 

Measure = CALCULATE(SUM(Table1[OK]))/CALCULATE(SUM(Table1[Total]),ALL(Table1))

Capture.PNG

Alsp please find the pbix as attached.

 

Regards,

Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

Thanks a lot, Frank! it is almost what I was looking for and indeed your answer was close to the result I expected, even simpler : just needed to remove the filter "ALL" !

 

Success rate (%) = CALCULATE(SUM(Sheet2[OK]))/CALCULATE(SUM(Sheet2[Total]))*100

 

Indeed, it alows to demonstrate one key difference between a column and a measure: the measure is using the current context where it is used then more dynamic.

Dynamic Average

Regards,

 

Ph.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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