[Calculated Fields] how to Get Count Product more last month

nanuutm

New Member
Joined
Mar 16, 2016
Messages
27
i want to used [Calculated Fields] on Pivot table to show customer buy number of product compare last month

Ex

Month 1
Customer 1 Buy 4 Product A B C D
Customer 2 Buy 3 Product A B C
Customer 3 Buy 3 Product A B D

Month 2
Customer 1 Buy 4 Product A B C E
Customer 2 Buy 3 Product A B D
Customer 3 Buy 4 Product A B C D


In pivot Table i used [Count Distinct]

Result

[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Month[/TD]
[TD]1[/TD]
[TD]2[/TD]
[TD]Grand Total[/TD]
[/TR]
[TR]
[TD]Customer 1[/TD]
[TD]4[/TD]
[TD]4[/TD]
[TD]4[/TD]
[/TR]
[TR]
[TD]Customer 2[/TD]
[TD]3[/TD]
[TD]3[/TD]
[TD]3[/TD]
[/TR]
[TR]
[TD]Customer 3[/TD]
[TD]3[/TD]
[TD]4[/TD]
[TD]4[/TD]
[/TR]
</tbody>[/TABLE]

I want to used [Calculated Fields] show like below

[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Month[/TD]
[TD]1[/TD]
[TD]2[/TD]
[TD]Grand Total[/TD]
[/TR]
[TR]
[TD]Customer 1[/TD]
[TD]4[/TD]
[TD]1[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]Customer 2[/TD]
[TD]3[/TD]
[TD]1[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]Customer 3[/TD]
[TD]3[/TD]
[TD]2[/TD]
[TD]2[/TD]
[/TR]
</tbody>[/TABLE]


What should i Used Logic in Calculated Fields


Sorry about my English
 

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