Editing columns and refreshing data

I am working with an auto-refreshing data model. Many of the columns in the various tables in the model have difficult-to-understand names. I’d like to rename the columns so they are easier to work with and reference in my measures and visualizations, however I’m worried that when the data refreshes, the columns will return to their original names from the source, rather than the new names I create for them (in power query or within the data view in desktop). Would this cause my measures and visualizations to break?

Is it possible to use power query to rename the columns so that each time the data refreshes, it applies the same column name changes to the newly-refreshed tables, such that the calculated columns and measures and visualizations continue to operate properly?

Hello @pete.langlois,

Thank You for posting your query onto the Forum.

Well yes, you can rename the columns in the Power Query and when you refresh the data the newly named columns will still remain intact. They’ll not throwback the error.

But now, let’s say after loading the data into the Query Editor you change the column name into your source file then it’ll throwback the error because let’s say you’ve the data with name “Column A” in your source and the same “Column A” has been loaded into the Query Editor with the same column name. Now if you change the column name from “Column A” to “Column B” in your source file then it’ll throwback the error but if you rename the column directly in your Query Editor then it’ll not throwback the error.

Also after creating the measures as well you can rename them when you drag them to the visualizations pane.

I’m also providing few of the links on the above explanation about how the Query Editor works when we try to make these types of changes and how these error can be rectified if committed. Also providing few additional links.

Still if you find it difficult to understand then just give a shout and will be there to help you.

Hoping you find this useful and meets your requirements. :slightly_smiling_face:

Thanks and Warm Regards,


Hi @pete.langlois, we’ve noticed that no response has been received from you since the 6th of February. We just want to check if you still need further help with this post? In case there won’t be any activity on it in the next few days, we’ll be tagging this post as Solved. If you have a follow question or concern related to this topic, please remove the Solution tag first by clicking the three dots beside Reply and then untick the checkbox. Thanks!

1 Like

Harsh - thanks for your response and the links. All very helpful.

One last follow up question before I resolve the post: if I’m working with a pbix file that has measures and visuals that reference the old column names, will those measures and visuals break if I change the column names in query, or will the measuers and visuals update with the new column names as I change them and continue to function properly? This particular pbix file has hundreds of measures and visuals and a dozen or so tables in the model, so I want to ensure everything remains consistent between the data source, the changes I make to column headers in query, and the existing measures and visuals.

Hello @pete.langlois,

You’re Welcome. :slightly_smiling_face:

I’m glad that you found those links useful and it helped you.

So lastly, before we sign off from this thread here’s the answer to your question.

No, the measures and visuals won’t break at all if you make any changes into the Power Query either to “Table Name” or to the “Column Name” after writing your all the measures. They’ll just get updated automatically into your measures.

In order to prove my case, below are the screenshots provided for the reference alongwith the explanation -

  1. Old Table Name and Column Name into the Measure - In the screenshot, you’ll observe that “Table Name” is “Sales Data” and the “Column Name” within that table is “Total Order Quantity” and “Unit Price”.

  1. Changing the Table and Column Name - Now, I’ll go into the Power Query and change the “Table Name” from “Sales Data” to “Sales” and will also change the “Column Name” of “Total Order Quantity” to “Order Quantity”.

  1. Click on “Close and Apply” button and let’s check whether the formula get’s updated accordingly or not.

So in the above given screenshot, you’ll observe that changes made to the “Table Name” as well to the “Column Name” gets updated into the formula.

Conclusion: Any changes made into the Power Query i.e. whether editing the “Table Name” or “Column Name” (in this case). The formula will incorporate those changes without breaking any measures or visuals. But if we make these type of changes directly into the “Data Source” then the measures and visuals will break unless we incorporate those changes into the Power Query as well. (For this, I’ve already provided the links above, that if you face any such situation like this then how it can be sorted).

Hope you find this useful and meets your requirements that you’ve been looking for, for the question that you’ve asked. :slightly_smiling_face:

Thanks and Warm Regards,

Thank, Harsh! That was the answer I was hoping for! Appreciate you taking the time to help. Also, I marked “solution” here so hopefully that closes the thread. First time on the forum so let me know if I need to do anything else to close the thread.

1 Like