Forum Discussion
Error (row index 1)
PGAT update your line as below, it is a missing last parameter:
#"Added Index" = Table.AddIndexColumn(Source, "Row Number" ,1, 1),
I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!
Hi there, thanks, what do you mean by missing last parameter?
- parry2k6 years ago
Super User
#"Added Index" = Table.AddIndexColumn(Source, "Row Number" ,1, 1)
You are missing last parameter ,1 in above M code.
- PGAT6 years ago
Helper 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 ago
Super 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.