Multiple value columns in pivot table- mistake: repeating column 1 value counts for other columns

Nina_B

New Member
Joined
Jul 27, 2014
Messages
3
Dear all,


I have tried now for several days to solve this problem and would be so thankful for any help.


I use Excel Mac 2011 and have the problem that if I want to display the count for values in multiple columns side by side, the count for column 2 repeats the same numbers as for count in columns 1.


An example I have: in the raw data, there are households who can hold up to 2 types of transportation items. There are 2 columns for each indicating type of transport households have. Q1_1 and Q1_2.
Each of these options are coded i.e. bike, car, bus are numbers from 1-8 as there are 8 options.


What I want: I want to create a pivot table that shows the counts for all households for Q1_1 and Q1_2 i.e. the two types of transport they may possess out of 8 different options.


What I did: There is no problem in creating the counts for either Q1_1 or Q1_2. Row label then is either of the one and the matching count of in the value field. It shows me that 5 households have a bike, 18 a car etc.
But if I want to display both counts next to each other, it presents the same counts for Q1_2 as for Q1_1, i.e. they show the 5 and 18 etc again. It seems the problem is the label row. I tried all solutions indicated on the web, fora etc e.g. to move both Q1_1 and Q1_2 into row label, then move Q1_2 into columns labels. That however just sorted the transportation mode from Q1_2 underneath Q_1 which is not what I want. I also tried to use 'sum of' 'count numbers' to see if it changes the way it counts the second transportation item. No success.


A note: the range from the transportation items 1-8 is not covered by the second item. However, in other examples i.e. yes, no questions I have the same issue even though answer options are completely congruent.


Is there anyone please who can help me? I have tried all I can and it seems I need to give up.


Thank you!!


Best, Nina
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
Dear all,

since I cannot figure out how to attach my workbook concerning, I will try to post the data here below!

Thank you so much for any possible help!

Best regards,
Nina


Problem and tables:

[TABLE="width: 519"]
<colgroup><col><col span="2"><col span="2"></colgroup><tbody>[TR]
[TD]Data given:[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="colspan: 2"]Each row represents a household[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="colspan: 3"]A household has no, one or two transportation items[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="colspan: 3"]The codes in column B and C represent different transportation modes. 1-8[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="colspan: 5"]Column A differentiates the households per four different zones (this is not compulsory, but also does not change the problem)[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="colspan: 2"]What I want:[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="colspan: 5"]Count values of B and C and show the frequency count for each transportation item in two columns next to each other asthe format of table 3.[/TD]
[/TR]
[TR]
[TD="colspan: 5"]This works individually, i.e. if I prepare a pivot table for either B and C, the counting is correct by using A and B respectively also for row labels.[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Table 1[/TD]
[TD][/TD]
[TD][/TD]
[TD]Table 2[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Zone[/TD]
[TD](All)[/TD]
[TD][/TD]
[TD]Zone[/TD]
[TD](All)[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="colspan: 2"]Count of Transport item 1[/TD]
[TD][/TD]
[TD="colspan: 2"]Count of Transport item 2[/TD]
[/TR]
[TR]
[TD]Row Labels[/TD]
[TD]Total[/TD]
[TD][/TD]
[TD]Row Labels[/TD]
[TD]Total[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD="align: right"]43[/TD]
[TD][/TD]
[TD]3[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD="align: right"]84[/TD]
[TD][/TD]
[TD]4[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD="align: right"]7[/TD]
[TD][/TD]
[TD]5[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD="align: right"]1[/TD]
[TD][/TD]
[TD]6[/TD]
[TD="align: right"]6[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD="align: right"]11[/TD]
[TD][/TD]
[TD]7[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD="align: right"]12[/TD]
[TD][/TD]
[TD]na[/TD]
[TD="align: right"]151[/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD="align: right"]2[/TD]
[TD][/TD]
[TD]Grand Total[/TD]
[TD="align: right"]161[/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD="align: right"]1[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Grand Total[/TD]
[TD="align: right"]161[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="colspan: 5"]However, if I want to present B and C at the same time (ie to prevent to prepare a table for each column) the count for column C repeats the same values as for column B. [/TD]
[/TR]
[TR]
[TD="colspan: 5"]I suppose the problem is the row label, but I cannot figure it out to have Excel count either column to all possible transportation options from 1-8 (this happens indespite that column C does not cover the entire range from 1-8, even if it would, it would not work)[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="colspan: 3"]Here with B as row label only to show the problem[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Table 3[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD] [/TD]
[TD]Values[/TD]
[TD] [/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Row Labels[/TD]
[TD]Count of Transport item 1[/TD]
[TD]Count of Transport item 2[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD="align: right"]43[/TD]
[TD="align: right"]43[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD="align: right"]84[/TD]
[TD="align: right"]84[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD="align: right"]7[/TD]
[TD="align: right"]7[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD="align: right"]11[/TD]
[TD="align: right"]11[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD="align: right"]12[/TD]
[TD="align: right"]12[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]2[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Grand Total[/TD]
[TD="align: right"]161[/TD]
[TD="align: right"]161[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="colspan: 3"]Or I get something like this if I enter both B and C as row labels[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Table 4[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD] [/TD]
[TD]Values[/TD]
[TD] [/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Row Labels[/TD]
[TD]Count of Transport item 1[/TD]
[TD]Count of Transport item 2[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD="align: right"]43[/TD]
[TD="align: right"]43[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]na[/TD]
[TD="align: right"]42[/TD]
[TD="align: right"]42[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD="align: right"]84[/TD]
[TD="align: right"]84[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD="align: right"]4[/TD]
[TD="align: right"]4[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]na[/TD]
[TD="align: right"]78[/TD]
[TD="align: right"]78[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD="align: right"]7[/TD]
[TD="align: right"]7[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]na[/TD]
[TD="align: right"]7[/TD]
[TD="align: right"]7[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD="align: right"]11[/TD]
[TD="align: right"]11[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]na[/TD]
[TD="align: right"]11[/TD]
[TD="align: right"]11[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD="align: right"]12[/TD]
[TD="align: right"]12[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]na[/TD]
[TD="align: right"]11[/TD]
[TD="align: right"]11[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]2[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]na[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]na[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Grand Total[/TD]
[TD="align: right"]161[/TD]
[TD="align: right"]161[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="colspan: 5"]How could I get the individual and correct counts to show at the same time? Here it seems I can get around this by combining the tables manually. [/TD]
[/TR]
[TR]
[TD="colspan: 5"]However my data set has far more complicated questions, where I would need to add up to ten of these individual counts or more.[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="colspan: 2"]Therefore I appreciate any help so much!![/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR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/TD]
[TD]na[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]7[/TD]
[TD]6[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]2[/TD]
[TD]na[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]1[/TD]
[TD]na[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]6[/TD]
[TD]na[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
 
Upvote 0
On the sheet with your raw data, manually type the numbers 1 thru 8 in cells E2 thru E9 and na in E10. In F1 type in Trans 1 Counts and G1 Trans 2 Counts. Now in F2, copy this formula and copy down and across:
=COUNTIF(B:B,$E2)
 
Upvote 0
Dear Ron,

thank you very much. This, in principle, would work if I would not want to filter then also for zones of households, communities etc. That is a first which is why a Pivot table solution would be really necessary. The example above is just a very simple illustration of the issue and I would need to look at far more combinations than only overall count of transportation modes.

Plus, it does do some mistakes in counting for some reason. If you have a tip how to post my workbook here, I can show with more detail.
(Here overall counts are wrong. It omits one count for option 6 in trans 1 and it omits a few na for trans 2)

Thanks a lot for your help!

Kind regards,
Nina


[TABLE="width: 205"]
<colgroup><col><col span="2"></colgroup><tbody>[TR]
[TD]Codes[/TD]
[TD]Trans counts 1[/TD]
[TD]Trans counts 2[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD="align: right"]43[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD="align: right"]84[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD="align: right"]7[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD="align: right"]11[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD="align: right"]11[/TD]
[TD="align: right"]6[/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD]na[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]143[/TD]
[/TR]
[TR]
[TD] [/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD] [/TD]
[TD="align: right"]160[/TD]
[TD="align: right"]153



[/TD]
[/TR]
</tbody>[/TABLE]
 
Upvote 0
You can't attach a file to a posting here, so you'd need to upload your file to a free file sharing service and then post the link here to access it. eg: Google Drive. Make sure you that you allow anyone with the link the right to download the file without a password.
 
Upvote 0

Forum statistics

Threads
1,223,236
Messages
6,170,912
Members
452,366
Latest member
TePunaBloke

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