Subtract values from the same column according to the criteria of others

l_lolo

New Member
Joined
Feb 20, 2022
Messages
3
Office Version
  1. 365
  2. 2019
  3. 2016
Platform
  1. Windows
Hello, I need help because I have been trying to solve the following problem for a long time:
I have a table with 5 columns that are divided into the sales area, the product and a specific date (week of the year) the planned sale and the actual sale:

AreaProductScenarioyear/month/weekunit
CongeladosPizzaVentas planificadasA2021 M1 S2200
FrescosYoguresVentas planificadasA2021 M1 S2100
VerduraManzanaVentas PlanificadasA2021 M1 S2300
CongeladosHeladoventas planificadasA2021 M1 S2200
CongeladosPizzaventas realesA2021 M1 S2200
FrescosYoguresventas realesA2021 M1 S250
VerduraManzanaventas realesA2021 M1 S2150
CongeladosHeladoventas realesA2021 M1 S2150

This table that I have created in PowerQuery is fed from an excel table that is updated weekly.

I have tried to create an additional column in the Pivot that is Delta between Planned and Actual. My problem is that I cannot find a way to subtract the actual value from the planned one, if the values of the area & product & year/month/week columns coincide. That is, it automatically calculates the difference between planned and actual for a certain product on a specific date.

I thought that the result should be the following:

AreaProductscenarioyear/month/weekunitdelta with actual
"""""0
"""""50
"""""150
"""""50
"""""
"""""
"""""
"""""

I attach the excel example.

Thank you all for the help :)
 

Attachments

  • PIC.PNG
    PIC.PNG
    82.3 KB · Views: 13

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
Welcome to the board l_lolo. I'd like to help, but I don't see the column planned sales and actual sales in your examples. are they part of the pivot table?
 
Upvote 0

Forum statistics

Threads
1,215,186
Messages
6,123,537
Members
449,106
Latest member
techog

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top