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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

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

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.