Forum Discussion

Back2Basics's avatar
Back2Basics
Icon for Resolver I rankResolver I
1 year ago
Solved

Renaming columns and excel

I have a PBI semantic model that is based on the data from an excel file. This file is the output from a MS form and has been running for over a year. This year they decided they needed to change som...
  • Back2Basics's avatar
    1 year ago

    I expect someone might find a better solution but this was the best we could get. 

    We used an excel file to copy and transpose paste the column names for each of the two tables. Then we added a third column where we added a new name that could be used on both files. Using vlookup we matched the columns from the files to the freshly name. 

    In Power Query in Power BI, we used the first row as the header and then had to rename all of the query steps in advanced editor. This wasn't too bad because we used a good structure for changes. We always suggest to suers that they create folders for data load, transformation and publish. The data load folder has all the initial connections to data. Then we reference queries and move to the transformation. Most of the time transformations are done as one long query, but sometimes we break them up into different steps (different steps here being referencing the query and adding more query steps) if this is easier to follow. All queries are removed from 'enable load' apart from the publish folder queries, which again are referenced from the transformation queries.