Forum Discussion
Expression.Error: The column 'Version' of the table wasn't found.
If you removed it from the dataset then it's no longer in your query...
The error is probably from one of the steps which refers to this column, e.g. Data Type change or Delete column, etc. If you have multiple steps in your query start from the bottom one and click on the next up and see if the error is still there, keep checking the previous steps until there is no error, so this means the step below is refering to this column, then you can just edit the formula to remove reference to this column. If you struggle, paste your full code here (View >> Advanced Editor)
I do struggle, a lot. Here is the full code:
let
Source = OData.Feed("http://mobtest:8080/PoweredODataALL"),
D_Nimike_table = Source{[Name="D_Nimike",Signature="table"]}[Data],
#"Removed Duplicates" = Table.Distinct(D_Nimike_table, {"NimikeID"}),
#"Renamed Columns" = Table.RenameColumns(#"Removed Duplicates",{{"Nimi", "Name"}, {"NimikeID", "Item ID"}, {"Nimikeryhmä", "Item group"}, {"Nimiketunnus", "Itemcode"}, {"NimikeVersio", "Item version"}, {"Nimikkeen luontipvm", "Item created date"}, {"Ohjaustapa", "Ctrl type"}, {"Perustettu", "Item founded"}, {"Rap ryhmä 1", "Reporting group 1"}, {"Rap ryhmä 2", "Reporting group 2"}, {"Tekn nimi", "Technical name"}}),
#"Extract code from Reporting Group 2" = Table.AddColumn(#"Renamed Columns", "Reporting Group 2 code", each Text.Start([Reporting group 2],4)),
#"Define Case1RG Column" = Table.AddColumn(#"Extract code from Reporting Group 2", "Case1RG", each if [Reporting Group 2 code] = "2005" then 1 else if [Reporting Group 2 code] = "2006" then 1 else 0),
#"Define Case2RG Column" = Table.AddColumn(#"Define Case1RG Column", "Case2RG", each if [Reporting Group 2 code] = "2007" then 1 else 0),
#"Case1RG and Case2RG to integer" = Table.TransformColumnTypes(#"Define Case2RG Column",{{"Case1RG", Int64.Type}, {"Case2RG", Int64.Type}})
in
#"Case1RG and Case2RG to integer"
This was made by someone a lot smarter than me, who´s help I no longer have...
The fields missing are NimikeVersio and Nimikkeen luontipvm. I did remove them from the sourcedata (I know I shouldn´t have done that, it was an accident) and I am no longer able to get them back. I have tried, but somehow Power BI doesn´t recognize them as the same columns. Is there anything I can do?
- Anonymous5 years agoNot applicable
So, to be clear, you had these columns in your dataset, removed them and now have you added them back to the dataset or not?
- If not, then just delete the reference to these columns in your #"Renamed Columns" step, just delete the text in red:
#"Renamed Columns" = Table.RenameColumns(#"Removed Duplicates",{{"Nimi", "Name"}, {"NimikeID", "Item ID"}, {"Nimikeryhmä", "Item group"}, {"Nimiketunnus", "Itemcode"},
{"NimikeVersio", "Item version"}, {"Nimikkeen luontipvm", "Item created date"},{"Ohjaustapa", "Ctrl type"}, {"Perustettu", "Item founded"}, {"Rap ryhmä 1", "Reporting group 1"}, {"Rap ryhmä 2", "Reporting group 2"}, {"Tekn nimi", "Technical name"}})2. If you added these columns to the datasource then and even if the name looks exactly the same, the Power Query may see something different (I had similar issue before with the column names but I don't know why it has happened). To sort out this problem you can delete the two column name changes as in my previous point and then see if the query works, if it does, then just double click on the column names you want to change and then rename these. This will recognise these columns properly.
- sw1235 years ago
Helper III
Hi,
Yes, I tried adding them back to the dataset, since removing them destroyed my report, but I don´t need these columns, I just need the report repaired 🙂 But as you said, Power Query does not recognize these two columns after I added them back to the datasource.
I tried removing the name change in the Renamed columns -step, and that works just fine in Power Query, but when I apply the changes, the report has broken and doesn´t show anything. I had some other reports with this same table and for these tables, this works just fine, but not in this particular report. I think it has something to do with the Case 1RG and Case 2RG built for these column, but this is too implex for me. Do you have any ideas what else I could try?
- Anonymous5 years agoNot applicable
I can't see any link in the next steps to these two columns, what error message are you getting now when you click on each step and which step gives you an error?