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

Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more

Reply
Jeff_Ng
Frequent Visitor

How to calculate weighted average from a same column

Hi,

 

Hope you can help me with this. Many thanks in advance. 

 

I want to create a measure in Power BI to calculate weighted average diameter from a same column/table as shown in table below. This measure must be able to be filtered by Date and Reach in the line chart.   

 

Jeff_Ng_1-1615461416728.png

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hello @Jeff_Ng ,

In power query editor, pivot the Item column using values Units.

 

Then in report create a measure

Measure = (SUM(TableName[Pipe Length(km)])*sum(TableName[Diameter(mm)]))/SUM(TableName[Pipe Length(km)])
 

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hello @Jeff_Ng ,

In power query editor, pivot the Item column using values Units.

 

Then in report create a measure

Measure = (SUM(TableName[Pipe Length(km)])*sum(TableName[Diameter(mm)]))/SUM(TableName[Pipe Length(km)])
 

Helpful resources

Announcements
Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

Top Solution Authors