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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
Turquesa
Frequent Visitor

Unable to add a new column to excel data souce

I have recently "inherited" a Power BI report at work and I have been tasked with adding a new column to the report in Power BI (it has already been added to the excel source). I get an error message when I try to refresh the Power BI (column 47 wasn't found).

 

I believe the Power BI I inherited already had some expression error because when I look at the applied steps it says "Expression Error: The Column 47 of the report wasn't found". When I looked at the excel source in more detail I noticed that the heading is blan but there is some data in the column. I then tried to add the new column in column 48 but I got the same error message. 

 

I would really appreciate if you could help me with this issue as I am fairly new to Power Bi. I tried to find in the Advanced Editor the number of columns (this is how I have added new columns in the past) but there is no specific reference to columns in the code.

 

Thanks in advance!

1 ACCEPTED SOLUTION
Idrissshatila
Super User
Super User

Hello @Turquesa ,

 

in power query, check where the error is coming from, in which step, the missing column should be referenced in a step, check if it is referenced in change type.



Did I answer your question? Mark my post as a solution! Appreciate your Kudos
Follow me on LinkedIn linkedIn
Vote for my Community Mobile App Idea

Proud to be a Super User!




View solution in original post

5 REPLIES 5
Turquesa
Frequent Visitor

Hi @Idrissshatila! Thanks for your quick reply.

 

Yes, I can see the following applied steps looking at an earlier version of the Power BI (before I tried to add the new column).

 

Changed Type: Expression Error. The column 47 of the table wasn't found

 

= Table.TransfromColumnTypes......................................("Column47,type any), ("Column48", type any)

 

Renamed Column: Table.RenameColumns(#"Changed Type",{{"Column47", "Correction number"}})

 

Removed Columns: Table.RemoveColumns(#"Renamed Columns",{"Column48"})

 

How can I fix this and add new columns?

 

 

 

 

 

 

@Turquesa ,

 

remove the column 47 from every step in the applied steps



Did I answer your question? Mark my post as a solution! Appreciate your Kudos
Follow me on LinkedIn linkedIn
Vote for my Community Mobile App Idea

Proud to be a Super User!




@Idrissshatila How do I do this?

@Turquesa , 

 

you can either remove the steps and recreate them again, or adjust the m code in the advanced editor to and remove the everything related to the missing row from this

= Table.TransfromColumnTypes......................................("Column47,type any), ("Column48", type any)

 

Renamed Column: Table.RenameColumns(#"Changed Type",{{"Column47", "Correction number"}})

 

Removed Columns: Table.RemoveColumns(#"Renamed Columns",{"Column48"})

 



Did I answer your question? Mark my post as a solution! Appreciate your Kudos
Follow me on LinkedIn linkedIn
Vote for my Community Mobile App Idea

Proud to be a Super User!




Idrissshatila
Super User
Super User

Hello @Turquesa ,

 

in power query, check where the error is coming from, in which step, the missing column should be referenced in a step, check if it is referenced in change type.



Did I answer your question? Mark my post as a solution! Appreciate your Kudos
Follow me on LinkedIn linkedIn
Vote for my Community Mobile App Idea

Proud to be a Super User!




Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

Find out what's new and trending in the Fabric Community.

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

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! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

Check out the November 2024 Power BI update to learn about new features.