Power BI: change the source, refresh the data and move columns

The data and the source are evolving and many times, I have to change or to update them. For instance, I start with this data located in my “download” folder:

power bi

My new data has more rows and more columns, to update it, there are 2 options:

  • To all tables, click on “refresh”
    power bi
  • To a specific table, click on the 3 dots then on “refresh data”
    power bi power bi

If my new data has less column, the column name and/or the source location have changed, I will get an error. To explain how I solve it, I will divide this article in 2 section, source and data.

Source

If I change the location, to update it, click on “transform data -> data source settings”:

power bi

If I have multiple sources, I will just select the correct one then click on “change source”:

power bi

Once done, the new data will refresh automatically.

Data

If my new data has 3 columns instead of 5 and “state” has been replaced by “stage”, I will go to the Power Query Editor by clicking on “transform data -> transform data”:

power bi

Select the first “change type” after “promoted headers”:

power bi

Removed the undesired columns and put the new name:

power bi

Once done, click on “close & apply” then the new data will refresh automatically:

power bi

NOTE: I have to do the same thing for “removed other columns” if I loaded at the beginning some specific columns to manage huge data (for more information, read Power BI: filter before loading data)

power bi power bi

To move or re-order the columns, it can be done only in the Power Query Editor. Click and hold on the column header:

power bi

Then move it but this change will have no impact in the table view, neither on the result:

Power Query Editor Table view
power bi power bi

If it is something that annoy you, to have the columns ordered as you like, the only way to do it, it is to delete the table and reload it again.

Interesting Topics