Forum Discussion

RK_UA's avatar
RK_UA
Regular Visitor
4 years ago
Solved

Weighted Average

Good day Power BI community,

 

I am looking for your expertise in calculating Overall Weighted average for 2nd Item number.

 

In the last two columns I am using formulas for Weighted Average under New Quick measure by anOrder number and 2nd Item Number. Returned values did not give me weighted average value of 518.57 for all 100020 in the Weighted averaged column and returned Unit_Cost_USD instead. 

 

Looking forward for your advise how to ptoperly calculate weighted average.

 

Thanks

RK

  • I have found a solution to this by adding Calculated column in my Data with the following formula

    Can now close this. Thanks for  the help.

     

4 Replies

  • RK_UA ,A measure should be like

     

    divide(sumx(Table,[Unit_Cost_USD] *[PDUORG]), Sum(Table[PDUORG]) )

    • RK_UA's avatar
      RK_UA
      Regular Visitor

      Hi Amit,

       

      After using the formula I get the following:

       

       

      In the last column for Weighted average, I need to get 518.57 for all three lines. This will be the weighted average for the 2nd Item number 100020 for All Orders (Second column).

       

      What is the formula for this?

       

      RK

       

       

  • RK_UA's avatar
    RK_UA
    Regular Visitor

    Good day amitchandak,

     

    How would you go about resolving the Weighted average as per mey earlier email?

     

    In advance thank you for your time.

     

    RK

  • RK_UA's avatar
    RK_UA
    Regular Visitor

    I have found a solution to this by adding Calculated column in my Data with the following formula

    Can now close this. Thanks for  the help.