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
RK_UA
Regular Visitor

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.

RK_UA_0-1660314631371.png

 

Thanks

RK

1 ACCEPTED SOLUTION
RK_UA
Regular Visitor

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

RK_UA_0-1660916275830.png

Can now close this. Thanks for  the help.

 

View solution in original post

4 REPLIES 4
RK_UA
Regular Visitor

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

RK_UA_0-1660916275830.png

Can now close this. Thanks for  the help.

 

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

amitchandak
Super User
Super User

@RK_UA ,A measure should be like

 

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

Hi Amit,

 

After using the formula I get the following:

 

RK_UA_0-1660324286848.png

 

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

 

 

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.