Jan 22 2020 02:47 PM
Hi, I have a table of data that is connected to my excel sheet through a query. When I try to refresh the table, I get this message:
[expression error]. The column "calendar" of the table wasn't found.
What do I do to fix this?
Jan 22 2020 11:14 PM
Depends...
Was the column removed on purpose? If not, add it to the source file again (in the same position it was before) and power query designer can load the data again
If the column was removed on purpose and you don't need it anymore, you must change all steps in the query designer which refer to this column.
In my example, I have loaded data from 3 columns and then deleted column 2. Now I had to remove all steps in Power Query which were related to this column so basically I had to delete the text in red in screenshot below.
Hope this helps
Nov 23 2020 04:28 PM
@PascalKTeam I am having a similar problem.
For over 4 years, we have been using a google sheet to get daily stock prices. We then published that google sheet to a .csv file that we inserted as a new query in Excel. It has been working swimmingly until 11/17/20. Now we simply get the error that says [Expression.Error] The column 'Symbol' of the table wasn't found. Nothing has changed in either the google sheet or the Excel file. No column heading have changed. In Excel, When I refresh the query - get the error - I went to Query, Edit, then clicked on Advanced Editor. Here is what is says:
let
Source = Csv.Document(Web.Contents("https://docs.google.com/spreadsheets/d/e/2PACX-1vRxo60CNgqdRzU2RrA-mwHVuXSIbBOg84uorEBwfr98QvDMVkHGTosxVTccn6zfRPAQ9wecQay8fgSY/pub?gid=1316400444&single=true&output=csv"),[Delimiter=",", Columns=14, Encoding=1252, QuoteStyle=QuoteStyle.None]),
#"Promoted Headers" = Table.PromoteHeaders(Source, [PromoteAllScalars=true]),
#"Changed Type" = Table.TransformColumnTypes(#"Promoted Headers",{{"Symbol", type text}, {"Date", type date}, {"Curr Price", type number}, {"52 Wk High", type number}, {"52 Wk Low", type number}, {"Mkt Cap", type number}, {"# Shares Out", type number}, {"Volume", Int64.Type}, {"Change", type number}, {"% Change", type number}, {"Earnings/Share", type number}, {"P/E Ratio", type number}, {"Currency", type text}, {"Comments", type text}})
in
#"Changed Type"
This is what is in my Google sheet:
We have tried deleting the query from excel; republishing the Google Sheet to a new .CSV file and re-inserting the query in Excel - still the same error.
I'd be grateful for some specific help in how to fix this. I'm pretty new to Power BI, so take some pity on how I'm explaining my issues please :))
Nov 24 2020 12:08 AM
I'd suggest to check credentials in Data Source settings on this source.
Do you see your columns on Promote Headers step?
Nov 24 2020 09:04 AM
Nov 24 2020 09:58 AM
Nov 24 2020 10:07 AM
Please try again. It didn't work few hours ago, right now I repeated your Power Query again and it works
It looks like it was break in services.
Nov 24 2020 10:08 AM
@millerboyz Most probably Google, please check my previous post here.
Nov 24 2020 10:51 AM
Nov 24 2020 11:49 AM
@millerboyz I definitely think it had something to do with the link to the google sheet. Now it works for me too. Of course, I already crated a NEW google sheet and new spreadsheet to get it to work, but now when I go back to the old ones they work. How crazy is that. What gets me though is why it didn't just "say" that the problem was with some sort of connection/permissions issue, but instead gave the error alluding to a column issue. Anyway - thanks to all who helped with this one. As much as I'm a bit peeved at google right now, I couldn't do my job with out them, so will just have to chalk it up to a learning exprerience!
Nov 24 2020 12:23 PM
If there is the problem with permission or like, Google returns you not the document but some page which informs you can't access the file or like.
Excel has no idea about that, it takes the page returned by Google assuming that is your document, and tries to transform it into table. First error appears is the lack or Symbol column, that's how your script is built. It returns that error and stops.
You may handle such errors, but that will require more serious effort in Power Query script building with coding on M-script.
Jan 27 2022 12:25 AM
Feb 11 2024 01:52 PM
Sep 04 2024 01:03 PM
Sep 04 2024 03:20 PM
I am getting the same error in Excel, but it is due to the source data being downloaded (from web site data source)
If the error is "[Expression error]. The column 'wxyz' of the table wasn't found" this means that somewhere in your current query code one (at least) step refers to a column named 'wxyz' that doesn't exist in the data Source (the Website you download from) at the time you Refresh the query
Is there a way to ignore the error and complete downloading the rest of the data to the row?
Maybe/Maybe not. Difficult to say without seeing your complete query code (post it if the following doesn't help)
When you create a query Power Query automatically creates a Change Type step after getting the data from an unstructured Source (i.e. a Website). That Change Type step "hard-codes" the column names (in the query code). For example, assume that when you create the query columns A, B, C, D exist in the data Source. Power Query auto. creates a Change Type step like:
= Table.TransformColumnTypes(Source,{{"A", Int64.Type}, {"B", type text}, {"C", type text}, {"D", type number}})
If next time you Refresh the query column "C" doesn't exist in the data Source you'll get error "[Expression error]. The column 'C' of the table wasn't found"
Assuming a Change Type step exist in your current query edit the latter and delete that step...
Sep 05 2024 10:13 AM
Sep 05 2024 10:37 AM