Skip to main content

Posts

Showing posts with the label column

How to handle changing column names in Power Query

When working with spreadsheets and tables within spreadsheets it can be common for the column names to change. This can be deliberate or accidental…. Fortunately there is a transformation in the Power Query interface that can deal with column header issues easily. Note - if the order of the columns change this wont work! In this example I have a table with 3 columns as shown here The associated query includes a transformation to create a new column with 10% of the price, called Fee. As you can see the column titled Price is included in the formula to create the new 'Fee' column. If for any reason this column changes then this formula will fail and present an error. To demonstrate this I'll change the column title to 'Price ($)' and refresh the query. As expected, the Fee column returns an error as the Price column has changed. The error details the following issue The first line of the error clearly states the Price of the record wasn’t found. How to fix this issue