Forum Discussion

joshua1990's avatar
joshua1990
Post Prodigy
3 years ago

Rename Column names based in input file

Hi experts!

Since a few days I have access to the raw tables of our ERP system.

All column names are based on a combination of letters and numbers. For the semantic conversion I have a input file that lists for each column name the description. Now I would like to change the column headers to the description that is stored in a different file.

How would you do this with Power Query in the most efficient and governed way?

1 Reply

  • Hi joshua1990 ,

     

    You should just be able to import your input file then, in your main table, do something like this:

    Table.RenameColumns(
        previousStep,
        List.Zip(
            {
                inputFile[columnNames],
                inputFile[newColumnNames]
            },
            MissingField.Ignore
        )
    )

     

    Pete