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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Help - Advanced Editor Issue

Hiya, please help i am sending myself mad!!!!

 

i have a query that has just stopped working and i cannot for the life of me work out why;

 

let
Source = Excel.Workbook(Web.Contents(""), null, true),
All_Sheet = Source{[Item="All",Kind="Sheet"]}[Data],
#"Promoted Headers1" = Table.PromoteHeaders(All_Sheet, [PromoteAllScalars=true]),
#"Changed Type2" = Table.TransformColumnTypes(#"Promoted Headers1",{{"Resourcer", type text}, {"Month", type text}, {"CV", Int64.Type}, {"Interview", Int64.Type}, {"CV Target", Int64.Type}, {"Interview Target", Int64.Type}, {"Placement Target", Int64.Type}, {"Points Target", Int64.Type}, {"Year", Int64.Type}, {"Month & Year", type date}, {"Maximum Value", Int64.Type}, {"CV Maximum Value", type number}, {"Interview Maximum Value", type number}, {"Points Maximum Value", type number}}),
#"Changed Type" = Table.TransformColumnTypes(#"Changed Type2",{{"Column1", type text}, {"Column2", type any}, {"Column3", type any}, {"Column4", type any}, {"Column5", type any}, {"Column6", type any}}),
#"Promoted Headers" = Table.PromoteHeaders(#"Changed Type", [PromoteAllScalars=true]),
#"Changed Type1" = Table.TransformColumnTypes(#"Promoted Headers",{{"Column1", type text}, {"Capgemini", Int64.Type}, {"Julia", Int64.Type}, {"Andy", Int64.Type}, {"Marcus", Int64.Type}, {"Helen", Int64.Type}}),
#"Renamed Columns" = Table.RenameColumns(#"Changed Type1",{{"Column1", "Month - Vacancies added"}, {"Andy", "Andy Vacancies"}, {"Capgemini", "Cap Vacancies"}, {"Helen", "Helen Vacancies"}, {"Julia", "Julia Vacancies"}, {"Marcus", "Marcus Vacancies"}})
in
#"Renamed Columns"

 

I keep getting "Expression.Error: The column 'Column1' of the table wasn't found." for the life of me i cannot work out why this is happening?

9 REPLIES 9
parry2k
Super User
Super User

@Anonymous if you go thru query steps, can you check if your query works until this step #"Changed Type2" seems like in next step after #"Changed Type"  is the problem area. Go thru each step and find out where is the issue.

 

As @Anonymous mentioned may be excel file is changed, seems like extra columns are removed from excel file.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Anonymous
Not applicable

@parry2k thanks for responding, it shows all steps unti;l the "changed type". i've looked at the original spreadsheet, nothing has changed at all, it's just not recognising the column1 ref, i've redone the qeury and still unless my coding is wrong them im at a loss, hence why i'm desperately seeking help Smiley Happy

@Anonymous are you open to share your pbix and excel file to look into it assuming it doesn't contain sensitive data. Feel free to PM me.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Anonymous
Not applicable

@parry2k Sadly it does contain sensitive data so i would be unable to share it 😞

 

I have changed the references from column numbers to the neames, as i feel like its not recognising them, this helped move it on and now its left me with a problem where the prmotoed headers has removed the names of the columns.... Grrrrr

@Anonymous can you change it to dummy data with few rows and then send it.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Anonymous
Not applicable

@parry2k doh!!!! of course yes... lol. I am away tomorrow but will over the weekend. thanks so much for trying to help....

@Anonymous no worries, whenever you are ready Smiley Very Happy



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Anonymous
Not applicable

Hi- I noticed that you're looking at an excell workbook. Check and make sure some smartass didn't change the column name in the excel workbook 

 

Esp if it workds with these first two lines 

let
Source = Excel.Workbook(Web.Contents(""), null, true),
All_Sheet = Source{[Item="All",Kind="Sheet"]}[Data],

Anonymous
Not applicable

Sailkitty,

 

thanks for the shout, i have checked this and it seems okay, for some reason its all okay till the "changed type" part, i have tried sticking another rename, but again this didnt work. it so odd..... 

 

Edd

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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