Impact of renaming columns in Power BI


Renaming columns in Power BI can have a severe impact on your reports. Initially, renaming columns in Power BI ensures that your end users don’t have to deal with cryptic system names from your source system. Over time, you may need to change a name of a column because of new terminology or to standardize existing names according to your naming convention.

There are many ways in which columns can be renamed and all of them have an impact on your reports in one way or another. In this post, the following options are discussed:

  1. Renaming columns in source
  2. Renaming columns in Power Query
  3. Renaming columns in Power BI graphical user interface (GUI)

Option 1: Renaming columns in source

To Keep Roche’s Maxim of Data Transformation in mind:

“Data should be transformed as far upstream as possible, and as far downstream as necessary.”

Database tables often have technical names so it makes sense to create dedicated views which then can be loaded with Power BI. Using business friendly names inside these views ensures all reports building on the data have identical naming. Because multiple reports can build upon a single source view, changing the source has the potential to impact multiple reports

Impact Overview: Renaming columns in source

Renaming columns in the source may result in refresh failures of your reports. The moment Power BI can’t find a referenced column, a refresh error message like the one below will be thrown.

Refresh errors

Renaming columns in source doesn’t always lead to refresh failures but errors in DAX and visuals are to be expected because the renamed column references are not updated. As a rule of thumb, renaming columns in the source system has the potential to disrupt anything building on top of it.

Option 2: Renaming columns in Power Query

Renaming columns in Power Query is often used when the report creator has no access to change the names directly in the source system. When using Power Query to transform data, it is very likely columns are named differently than in the source system or entirely new columns are created.

Renaming columns in Power Query has possible impact on all reports which are connected to this data set. Downstream references in DAX or columns used in visuals break when renaming directly in Power Query. This is true for reports with a dataset in import mode but also for reports building on the dataset via live connection.

Impact Overview: Renaming columns in Power Query

To rename the columns directly in the source may be the more fitting approach especially if multiple reports are building on top of the same data.

Option 3: Renaming columns in Power BI GUI

When renaming columns directly in the Power BI user interface, the impact to the report you are currently working with is minimal. References in measures and visuals are automatically updated by Power BI. In the background, a new step is added in Power Query. Reports building on the current dataset via live connection will be impacted if the renamed column is directly added to a visual or used in a report level measure.

Impact Overview: Renaming columns in Power BI GUI

In the screenshots below the same visual is displayed. First in a .pbix file which contains the dataset via import mode and second in a report which is live connected with the same dataset. Changing the name of the column “Group” to anything else like “IncomeGroup” is handled by Power BI in the .pbix file without problems. However, because the visual in the live connected report directly references the old column name, the visual breaks.

If you have added these visuals to a dashboard, the same error will appear on your dashboard.

You can always check the lineage of your data in the Power BI Service. The lineage view allows to identify which downstream artefacts are impacted by your changes.

A word about apps.

Apps allow you to publish multiple Power BI artefacts to your users. When publishing, the current state of your reports is packaged and made available to your audience. Although, it is not obvious form the lineage view, all discussed options to rename columns have the potential to break visuals in your published apps. Because the reports in your app are building on top of the dataset, there are multiple ways your apps in production can have issues after a column rename. With option 1 “renaming columns in source”, you risk refresh issues of the data or problems with visuals in your published app. With option 2 and 3, you risk issues with visuals not displaying data because the referenced columns are not available in the dataset anymore. It is necessary to fix all the issues in the report and then redeploy your app again with the updated reports.

Errors in published app after changing dataset

Final thoughts

For small reports, there are simple solutions to rename columns. Over time, your BI landscape tends to grow and ensuring smooth changes isn’t staying a simple task for long. Planning a consistent naming scheme ahead of time goes a long way. But change will always be a part of your data journey. Adopt a robust deployment strategy, which allows you to develop and test without the worries of accidentally impacting your reports in production.

,

One response to “Impact of renaming columns in Power BI”

Leave a Reply

Your email address will not be published. Required fields are marked *