Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi All,
I am trying to calculate price volume mix variance and having a trouble to find a way how to multiply the average value for wholeportfolio by values in a single rows.
I would like to multiply Delta Quantity for each product by average price per piece (yellow highlighted). I am aiming also the whole calculation work flexible as I have more dimensions like Region, Pack type, Customer etc.
Thank you for help.
Solved! Go to Solution.
@jordanesqu , it can be
avg price per piece = calculate([price per piece], all(Table[product]))
or
avg price per piece = calculate([price per piece], all(Table))
new measure = [Delta Qty] * [avg price per piece]
also refer
https://community.powerbi.com/t5/Desktop/Percentage-of-subtotal/td-p/95390
https://www.sqlbi.com/articles/using-allexcept-versus-all-and-values/
@jordanesqu , it can be
avg price per piece = calculate([price per piece], all(Table[product]))
or
avg price per piece = calculate([price per piece], all(Table))
new measure = [Delta Qty] * [avg price per piece]
also refer
https://community.powerbi.com/t5/Desktop/Percentage-of-subtotal/td-p/95390
https://www.sqlbi.com/articles/using-allexcept-versus-all-and-values/
Hi @jordanesqu -
Try something like this:
VolPriceMix =
VAR __AllProdAvg =
CALCULATE (
DIVIDE ( SUM ( Products[Price] ), SUM ( Products[QtyCY] ) ),
ALLSELECTED ( Products )
)
RETURN
CALCULATE ( SUM ( Products[DeltaQ] ) * __AllProdAvg )
Hope this helps
David
@dedelman_clng You can remove the last CALCULATE as it is not doing anything there 🙂
User | Count |
---|---|
25 | |
12 | |
8 | |
6 | |
6 |
User | Count |
---|---|
26 | |
12 | |
12 | |
10 | |
6 |