Forum Discussion
Problem with "pivote column" function
Ok. Try dragging and dropping the Add Index step up your steps list to before your first Unpivot.
This should give you ID groups after the unpivot that PQ will group back up correctly after the final pivot.
Pete
Tried it too.
I added an index column before the first unpivot:
And after the unpivot step it looks like this:
But if I want to pivot it back again I still receive the same error...
Do you have any other tips?
Thank you so much
Max
- BA_Pete3 years agoSuper User
It looks like you've unpivoted the Index with the other columns.
Select your index column before the unpivot step, go to the Transform tab > Unpivot Columns (dropdown) > Unpivot Other Columns. This should keep your Index column intact to be used as an ID for the pivot step later.
If this doesn't work, can you provide your initial data from the following screenshot as copyable data please?
You can copy it from Excel and paste it directly in here, or you can paste it into 'Enter Data' in Power Query and copy the M code from that query.
Pete