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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
danish169
Helper I
Helper I

Day Grouping Weighted Average

Hello experts, 

 

Having a problem with the following dataset of orders - the order id's are nested under the day of the month:

 

danish169_1-1652809788133.png

 

I need to work out the average market unit rate by calculating a weighted average depending on the qty sold. 

 

So far I can calculated out the contribution of each row in the final column yet this doesnt help much in the end as I can then not utilise it. 

 

I need to see this weighted average market unit rate grouped by day and on the row total, if this then sits on the month and year row total that would be ideal too. Something similar to the following 

 

danish169_2-1652810145619.png

 

 

Ive tried to follow that post and still get lost - https://community.powerbi.com/t5/Desktop/Weighted-Average-Total-Measure/m-p/525284

Hopefully someone can assist 

 

 

1 ACCEPTED SOLUTION
danish169
Helper I
Helper I

Many thanks I was getting stuck on the visual / dax itself which was throwing my maths off. I just had to divide the total order value by qty and ey voila. 

View solution in original post

2 REPLIES 2
danish169
Helper I
Helper I

Many thanks I was getting stuck on the visual / dax itself which was throwing my maths off. I just had to divide the total order value by qty and ey voila. 

amitchandak
Super User
Super User

@danish169 , Create a meausre like

 

Calculate([#DailyWeightedAvg], allexcept(Table, Table[Date]))

 

or

 

Calculate([#DailyWeightedAvg], filter(allselected(Table), Table[Date] = max(Table[Date])) )

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.