Repeating column names

Kaso

New member
Joined
Apr 26, 2017
Messages
24
Reaction score
0
Points
0
Excel Version(s)
2013, 2016, 365
Hey it's me again with a new question^^

I have multiple columns with the same name but if i work with PQ it will change that to info1, info2, info3 which i do not want.
Does anyone have a solution to have it like in the sample picture at the end? And yes i could make the 3 Name, Since, Info columns
to one, but since i do already have a lot of rows i do not wanna have more.

Thx Kaso
 

Attachments

  • Sample.PNG
    Sample.PNG
    8.1 KB · Views: 16
Hey Kaso,

So this is actually an issue with the structure of Tables in Excel, not specifically Power Query. Excel Tables cannot have duplicated names for column headers, and Power Query follows the same rules. Even if you could make this work in Power Query (which you won't be able to do), writing it out to an Excel worksheet or the Data Model would turn them in Info1, Info2, etc..

Having said this, you could fake it by:
-landing the data to a table using the Info1, Info2, etc... names
-create another "translation" table that maps Info1 to Info, etc...
-create a set of VLOOKUP() functions in the row above your data table to look up the names you want
-format that header row like the header row of the table
-hide the header row of the table

You'll lose the ability to filter, but at least you'll get the column names displaying that you are looking for.
 
Thanks for your answer Ken,

i kinda solved it for my purpose. For each time a item appears that already exists i add a space.
Doing that i get info, info<1x space>, info<2x space> .. That way they all look the same and it does not affect anything.
Works for now, but isn't rly what i was looking for^^
 
Back
Top