Forum Discussion

phesc's avatar
phesc
New Member
7 years ago
Solved

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!

  • phesc's avatar
    phesc
    7 years ago

    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.

2 Replies

    • phesc's avatar
      phesc
      New Member

      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.