Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Expand tables where first column has a differenct name

I have a table with two columns (see Query1 in PBXI file in the link below). I use the first column to filter the second columns of tables. Once I filter my table I want to expand the sleceted tables. The problem is that each table has a differet name for the first column so when I expand it I only get the first tables data in the first column. How can I make all the first columns have the same name before expanding so that my data is formated properly?  

 

 

https://drive.google.com/file/d/166Ic5QjIB8Ux5Qeri3fF7xGy0ttOZddg/view?usp=sharing 

  • You can add a custom column with a formula like this to rename all the first columns.

     

    = Table.RenameColumns([all], {Table.ColumnNames([all]){0}, "New Name"})

     

    Regards,

    Pat

4 Replies

  • mahoneypat's avatar
    mahoneypat
    Icon for Microsoft Employee rankMicrosoft Employee

    You can add a custom column with a formula like this to rename all the first columns.

     

    = Table.RenameColumns([all], {Table.ColumnNames([all]){0}, "New Name"})

     

    Regards,

    Pat

  • AlB's avatar
    AlB
    Icon for Community Champion rankCommunity Champion

    Hi Anonymous 

    Can you include the files that the query accesses? The steps are not visible

     

    Please accept the solution when done and consider giving a thumbs up if posts are helpful. 

    Contact me privately for support with any larger-scale BI needs, tutoring, etc.

     

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi AlB I added the folder that I use as the data source.