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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
NickT
New Member

Subtracting two rows in Power BI

I have sales data, cost data and hence margin data for two different periods.

 

Period        Volume         Sales          Cost of sales     Margin   Unit selling price  Unit cost    Unit margin

Qtr1             50,000      £100,000       £60,000           £40,000             £2                   £1.20            £0.80 

Qtr2             80,000      £120,000       £80,000           £40,000             £1.50              £1.00            £0.50

  

I want to calulate the difference between the two data sets so I can explain the margin movement between the two periods.

I want to automate the explanation for the volume variance, price variance and cost variance

 

Once I have explained the movement between volume, sales price and cost I want to slice on the data to slice it further by sales region, product category, salesman etc.

 

Any advice would be very much appreciated.

 

Kind regards

 

NickT 

 

3 REPLIES 3
Anonymous
Not applicable

Not sure how would like to present. Could you please explain the expected output.

 

Thanks
Raj

Hi Raj

 

What I am looking to achieve is a waterfall chart as follows:

 

Opening % margin

 

Volume variance

 

Price variance

 

Cost variance

 

Closing % margin

 

I then want to then slice this graph by sales region, portfolio category, sales channel etc. to interrogate the data further.

 

The interrogation will be carried out by a series of slicers set against the base data in the waterfall chart.

 

In the background I will have a data tab with the supporting backing data.

 

I hope this helps.

 

Kind regards

 

Nick

Volume period 1Volume period 2Gross price period 1Gross price period 2Discount period 1Discount period 2Cost period 1Cost period 2Net price period 1Net price period 2Margin period 1Margin period 2Gross price per unit period 1Gross price per unit period 2Discount per unit period 1Discount per unit period 2Net Price per unit period 1Net Price per unit period 2Unit margin period 1Unit margin period 2Cost per unit period 1Cost per unit period 2Period 1 margin %Period 2 magin %Volume differenceDiscount differencePrice diferenceCost differenceCheckVolume difference %Discount difference %Price difference %Cost difference %% Check
5060£1,000.00£1,100.00£100.00£130.00800825£900.00£970.00£100.00£145.00£20.00£18.33£2.00£2.17£18.00£16.17£2.00£2.42£16.00£13.7511%15%£20.00-£10.00-£100.00£135.00£0.002%-1%-9%12%4%
                                  
        Gross price less discountNet price less costGross price divided by volumeDiscount divided by volumeNet price divided by volumeMargin divided by volumeCost divided by volumeMargin divided by net priceDifference in volume times unit margin period 1Difference in unit discount times period 2 volumeDifference in unit price times period 2 volumeDifference in unit cost times period 2 volume Volume difference / margin movement times margin % changeDiscount difference / margin movement times margin % changePrice difference / margin movement times margin % changeCost difference / margin movement times margin % change 

I AM TRYING TO REPLICATE TEH ABOVE CALCULATIONS IN POWER BI

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.