How to pivot a data sheet to count multiple columns with Yes/No entries

Highlander Mc

New Member
Joined
Jun 11, 2016
Messages
2
Hi

I'm trying to pivot the following scenario:

ChairsTablesCarpets
Room 1YesYesYes
Room 2NoYesYes
Room 3NoNoYes
etc

<colgroup><col width="64" span="4" style="width:48pt"> </colgroup><tbody>
</tbody>

To give the following answer
YesNoTotal
Chairs123
Tables213
Carpets303

<colgroup><col width="64" span="4" style="width:48pt"> </colgroup><tbody>
</tbody>

Currently my efforts just seem to stack the different Yes/No on top of each other. Is it possible to achieve the above?
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
With PowerQuery

ItemsChairsTablesCarpetsCount of ItemsValue
Room 1YesYesYesAttributeYesNoGrand Total
Room 2NoYesYesCarpets
3​
0​
3​
Room 3NoNoYesChairs
1​
2​
3​
Tables
2​
1​
3​

step1
Load source table into PQ editor then
Code:
[SIZE=1]let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    #"Unpivoted Other Columns" = Table.UnpivotOtherColumns(Source, {"Items"}, "Attribute", "Value")
in
    #"Unpivoted Other Columns"[/SIZE]

step 2
insert PivotTable from external data source (eg. Query - Table1)
 
Last edited:
Upvote 0

Forum statistics

Threads
1,213,567
Messages
6,114,342
Members
448,570
Latest member
rik81h

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