Pivot Columns with repeating rows

swmakin

New Member
Joined
Apr 29, 2016
Messages
5
I am trying to pivot columns with repeating data to rows. However as I have duplicated information in the Data column when I Pivot (Don't aggregate) I get the following error message.

ValueData
NameEric
Address Line 129 Acacia Road
Address Line 2Dandytown
Address Line 3Beano
Address Line 4SE10 1BA
Address Line 50
Address Line 60
NameGeneral Blight
Address Line 129 Acacia Road
Address Line 2Dandytown
Address Line 3Beano
Address Line 4SE10 1BA
Address Line 50
Address Line 60
NameChief O'Reilly
Address Line 129 Acacia Road
Address Line 2Dandytown
Address Line 3Beano
Address Line 4SE10 1BA
Address Line 50
Address Line 60

<tbody>
</tbody>

<tbody>
</tbody>

Expression.Error: There were too many elements in the enumeration to complete the operation.
Details:
List

Help much appreciated.
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
Code:
let
    Source = Table1,
    #"Added Index" = Table.AddIndexColumn(Source, "Index", 0, 1),
    AddedCustom = Table.AddColumn(#"Added Index", "Address Line 1", each #"Added Index"{[Index]+1}[Data]),
    AddedCustom2 = Table.AddColumn(AddedCustom, "Address Line 2", each #"Added Index"{[Index]+2}[Data]),
    AddedCustom3 = Table.AddColumn(AddedCustom2, "Address Line 3", each #"Added Index"{[Index]+3}[Data]),
    AddedCustom4 = Table.AddColumn(AddedCustom3, "Address Line 4", each #"Added Index"{[Index]+4}[Data]),
    AddedCustom5 = Table.AddColumn(AddedCustom4, "Address Line 5", each #"Added Index"{[Index]+5}[Data]),
    AddedCustom6 = Table.AddColumn(AddedCustom5, "Address Line 6", each #"Added Index"{[Index]+6}[Data]),
    #"Renamed Columns" = Table.RenameColumns(AddedCustom6,{{"Data", "Name"}}),
    #"Removed Columns" = Table.RemoveColumns(#"Renamed Columns",{"Index"}),
    #"Removed Alternate Rows" = Table.AlternateRows(#"Removed Columns",1,6,1)
in
    #"Removed Alternate Rows"
 
Upvote 0

Forum statistics

Threads
1,214,643
Messages
6,120,702
Members
448,980
Latest member
CarlosWin

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