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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

HELP MEASURE TO CALCULATE PRICE VARIANCE BY MULTIPLE FIELDS

Hello helpers,

Im relative new to PBI but facing a quite hard problems. I want to calculate price variances as below and summarise by Product, Account Code, Cost Code. I have just writed a measure like this:

TARGET PRICE VARIANCE = IF(OR([UNIT PRICE]=0,[SUM TARGET UNIT COST]=0),0,[SUM TOTAL VOLUME]*([UNIT PRICE]-[SUM TARGET UNIT COST]))
UNIT PRICE = [SUM TOTAL COST]/[SUM TOTAL VOLUME]
YOY UNIT PRICE = [YOY TOTAL COST]/[YOY TOTAL VOLUME]
The summarisation by Product get well as I expected, but when I summarised by Account Code and Cost Code not right.
Capture.PNG
 
 
 
 
I look forward to receiving your advise. Thanks for your attention

Capture.PNG

 

1 REPLY 1
v-yuta-msft
Community Support
Community Support

@Anonymous ,

 


The summarisation by Product get well as I expected, but when I summarised by Account Code and Cost Code not right.
Capture.PNG
 
 
 
 
I look forward to receiving your advise. Thanks for your attention

Capture.PNG


 What's your expected result? The second table seems to be same with the first one. What does "summarised by Account Code and Cost Code" mean? 

 

Regards,

Jimmy Tao

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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