Pivot table and calculated items based on condition

liulilli

New Member
Joined
Jan 16, 2022
Messages
6
Office Version
  1. 365
Platform
  1. Windows
Hello,
I have a problem with a pivot table for which I've been struggling for a while, without being able to reach a solution. I'll try to explain myself as best as I can.
I have a data source composed like this:

PRODUCTSMonthSales
A01/01/202310
A01/01/202310
B01/01/202320
C01/01/202330
C01/01/202310
A02/02/202310
B02/02/202320
C02/02/202350
C03/03/202310
B03/03/202320
A03/03/202340

From this data source I create a pivot like this, summarizing the sales:

01/01/202302/02/202303/03/2023
B202020
C405010
D (calculated item)(A * 0,5) = 10(A * 0,5) = 5(A * 0,5) = 20
E (calculated item)(A * 0,5) = 10(A * 0,5) = 5(A * 0,5) = 20

I need the pivot table to split the sales of product A in different percentages based on the month:

01/01/202302/02/202303/03/2023
B202020
C405010
D(A * 0,5) = 10(A * 0,7) = 7(A * 0,3) = 12
E(A * 0,5) = 10(A * 0,3) = 3(A * 0,7) = 28

I have freedom to create additional helper columns on the data source and on the pivot table, but I cannot create macros unfortunately.
If someone could help me with this, I would be immensely grateful

Thank you in advance and have a great day!
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.

Forum statistics

Threads
1,214,808
Messages
6,121,681
Members
449,048
Latest member
81jamesacct

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