Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Fidezuri1990
Helper I
Helper I

RE: Column Name error - Need to change the column name in PBI model but it showing same error

Hi everyone,

 

I have a PBI report that gets updated every month. The PBI report extracts monthly Excel files through SharePoint.

 

It has been doing fine for more than 10 months now. However, recently a column name in the July Excel sheet has been changed from "Number of Late Penalties or Quality Points_1" to "Number of Late Penalty Points", and it has been agreed the PBI model needs to be updated to accommodate to the new column name: 'Number of Late Penalty Points'. Obviously, an error is expected upon refresh with the latest month update from July. PBI states that "The Column 'Number of Late Penalties or Quality Points_1' of the table wasn't found. Details: Number of Late Penalties or Quality Points_1." The error occurs when the file is being transformed.

 

The solution is to rename the column name to the new one, and hence I changed the name of the column to 'Number of Late Penalty Points' in PBI Power Query Editor on the Transform Sample File. However, it still gave me the same error. How do I resolve this issue? Does the PBI report reads old column name from old file and the new column name from Jul everytime it refreshes? Thank you.

1 ACCEPTED SOLUTION
Fidezuri1990
Helper I
Helper I

i managed to figure out the solution. 

I chose Option #2 from this video: https://www.youtube.com/watch?v=gJPA_Faotkk&list=PPSV . Happy trying!

View solution in original post

4 REPLIES 4
Fidezuri1990
Helper I
Helper I

i managed to figure out the solution. 

I chose Option #2 from this video: https://www.youtube.com/watch?v=gJPA_Faotkk&list=PPSV . Happy trying!

Fidezuri1990
Helper I
Helper I

I also would like to mention that there is a Sample File (an Excel file) uploaded onto Power Query Editor which has the old column name. Do I need to re-upload a new Sample File (Excel File) with the new column name? 

bhanu_gautam
Super User
Super User

@Fidezuri1990 ,

  • Check All Query Steps: Ensure that all steps in the Power Query Editor are updated to reflect the new column name. Sometimes, the column name change might not propagate through all steps. Here’s how you can do it:
  • Open Power Query Editor.
    Go through each step in the Applied Steps pane on the right.
    Look for any step that references the old column name "Number of Late Penalties or Quality Points_1" and update it to "Number of Late Penalty Points".
    Update Column References in M Code: If the column name is hardcoded in the M code, you need to update it manually:
  • In the Power Query Editor, click on the "Advanced Editor".
    Search for any instance of "Number of Late Penalties or Quality Points_1" and replace it with "Number of Late Penalty Points".
    Make sure to check all queries, not just the one for the Transform Sample File.



Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






Thank you for your response. I did review all the M language, but still it gives me the same error: "OLE DB or ODBC error: [Expression.Error] The column 'Number of Late Penalty or Quality Points_1' of the table wasn't found."

 

I realised the model uploaded all files, so it appears that it may read the old column names from past files and the new name from July file, therefore giving me this error? My first question is do the PBI report extract the July file only, or it extracts all files (old & new)?

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.