Pivot table: Row fileds with multiple options

pollx

New Member
Joined
Apr 2, 2016
Messages
1
Hello guys

I have a table looking like this:

[TABLE="class: outer_border, width: 500"]
<tbody>[TR]
[TD="align: left"]Row[/TD]
[TD="align: left"]A[/TD]
[TD="align: left"]B[/TD]
[TD="align: left"]C[/TD]
[TD="align: left"]Sales[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]22[/TD]
[/TR]
[TR]
[TD="align: right"]2[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]103[/TD]
[/TR]
[TR]
[TD="align: right"]3[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]113[/TD]
[/TR]
[TR]
[TD="align: right"]4[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]77[/TD]
[/TR]
[TR]
[TD="align: right"]5[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]109[/TD]
[/TR]
[TR]
[TD="align: right"]6[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]101[/TD]
[/TR]
</tbody>[/TABLE]


And from this table I create a pivot table. The result I need to get is this:


<tbody>
[TD="align: left"]A[/TD]
[TD="align: left"]B[/TD]
[TD="align: left"]Sum - Sales[/TD]

[TD="align: left"]0[/TD]
[TD="align: left"]0[/TD]
[TD="align: right"]150[/TD]

[TD="align: left"][/TD]
[TD="align: left"]1[/TD]
[TD="align: right"]102[/TD]

[TD="align: left"]1[/TD]
[TD="align: left"]0[/TD]
[TD="align: right"]345[/TD]

[TD="align: left"][/TD]
[TD="align: left"]1[/TD]
[TD="align: right"]268[/TD]

[TD="align: left"] Total Result [/TD]
[TD="align: left"][/TD]
[TD="align: right"] 865 [/TD]

</tbody>

What I exactly need as a final summary is not B being under A but A and B listed with all their values onto different rows.. Something like this

[TABLE="class: outer_border, width: 500"]
<tbody>[TR]
[TD="align: left"]A[/TD]
[TD="align: right"]0[/TD]
[TD="align: left"]sum of sales[/TD]
[/TR]
[TR]
[TD="align: left"]A[/TD]
[TD="align: right"]1[/TD]
[TD="align: left"]sum of sales[/TD]
[/TR]
[TR]
[TD="align: left"]B[/TD]
[TD="align: right"]0[/TD]
[TD="align: left"]sum of sales[/TD]
[/TR]
[TR]
[TD="align: left"]B[/TD]
[TD="align: right"]1[/TD]
[TD="align: left"]sum of sales[/TD]
[/TR]
</tbody>[/TABLE]

Any idea how can i get the last table ?

Thanks in advance!
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.

Forum statistics

Threads
1,223,275
Messages
6,171,123
Members
452,381
Latest member
Nova88

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