Forum Discussion
Error (row index 1)
Hi there, thanks, what do you mean by missing last parameter?
#"Added Index" = Table.AddIndexColumn(Source, "Row Number" ,1, 1)
You are missing last parameter ,1 in above M code.
- PGAT6 years agoHelper III
Hi, thanks again, the previous display was from the error page, and it relates to this table below. Where can i go to update the line "Added Index" = Table.AddIndexColumn(Source, "Row Number" ,1, 1)? sorry, do I go to error page to update?
let
Source = #"Table20191307 (OA)",
#"Appended Query" = Table.Combine({Source, #"Table20191307 (DA)", #"Table20191307 (CA)", #"Table20191307 (AGT-KCDCA)"}),
#"Added Conditional Column" = Table.AddColumn(#"Appended Query", "Country", each if [TYPE] = "OS" then [Ship Org] else if [TYPE] = "DS" then [Ship Dest] else [Ship Dest]),
#"Inserted Merged Column" = Table.AddColumn(#"Added Conditional Column", "Merged", each Text.Combine({[Year], "-1-1"}), type text),
#"Changed Type" = Table.TransformColumnTypes(#"Inserted Merged Column",{{"Merged", type date}}),
#"Extracted Year" = Table.TransformColumns(#"Changed Type",{{"Merged", Date.Year, Int64.Type}}),
#"Renamed Columns" = Table.RenameColumns(#"Extracted Year",{{"Year", "Year (TEXT)"}, {"Merged", "Year"}}),
#"Replaced Value" = Table.ReplaceValue(#"Renamed Columns","DO NOT USE -THE MI","MOVERS INTERNATION",Replacer.ReplaceValue,{"Booker", "Partner"}),
#"Replaced Value1" = Table.ReplaceValue(#"Replaced Value","DO NOT USE - THE M","MOVERS INTERNATION",Replacer.ReplaceValue,{"Booker", "Partner"}),
#"Replaced Value2" = Table.ReplaceValue(#"Replaced Value1","DO NOT USE-THE MI","MOVERS INTERNATION",Replacer.ReplaceText,{"Booker", "Partner"})
in
#"Replaced Value2"- parry2k6 years agoSuper User
PGAT you have to look at the queries that use addindexcolumn function, this particular query is not using that, what other tables you are getting error in Power Query, you have to check all those, without seeing the full picture, it is very hard to provide the appropriate solution. When you find the table which has the error, just update the syntax as provided.
- PGAT6 years agoHelper III
Thank you, Sir! Is there a possibility that i will not be able to find this? As in, if i have deleted it by mistake. I am not sure. I really hope to be able find that missing piece so that I can update it. The error shown relates to only this "Table20191307" but yet, I cannot locate addindexcolumn in the query. I understand it is difficult as you do not have view to all my queries. I really appreciate every possible step you are advising. Thanks.