Forum Discussion
eburke133
10 years agoNew Member
Average weighted part pricing
Is there a function(s) in Power BI that would calculate an average weighted pricing change over time? Weighted by the amount of spend in 2015. I would also need this weighting to adjust based on the...
eburke133
10 years agoNew Member
Thanks for the help here. I am still having issues getting this to apply correctly. Can you elaborate on the two tables?
MattAllington
Community Champion
10 years agoYeah, sorry that wasn't quite right. It is always better/easier if you create a sample workbook and post it. That will get the fastest and most accurate results.
Total Spend:=sumx(values(Data[Part #]),calculate(SUMX ( Data,Data[Invoice Spend])))
Total Qty:=sumx(values(Data[Part #]),calculate(SUMX (
Data,
DIVIDE ( Data[Invoice Spend], Data[Invoice Price] )
)))
Weighted Price:=DIVIDE([Total Spend] , [Total Qty])
Take a look at my Excel book here.
https://www.dropbox.com/s/vg1ztg9vr8542sh/weighted%20price.xlsx?dl=0