The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hello experts,
Having a problem with the following dataset of orders - the order id's are nested under the day of the month:
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
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
Solved! Go to Solution.
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.
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.
@danish169 , Create a meausre like
Calculate([#DailyWeightedAvg], allexcept(Table, Table[Date]))
or
Calculate([#DailyWeightedAvg], filter(allselected(Table), Table[Date] = max(Table[Date])) )
User | Count |
---|---|
16 | |
8 | |
6 | |
6 | |
5 |
User | Count |
---|---|
24 | |
13 | |
13 | |
8 | |
8 |