Forum Discussion
Index column breaks Gateway refresh
Hi everyone. I think I found the problem and the solution (at least it worked for me):
I'm not sure when but Microsoft updated the Power BI function Table.AddIndexColumn accepting the columnType as an optional argument at the end. When you create the Index, PowerBI uses this function with the columnType argument added. If your gateway has an unupdated version of Power BI, you will get you the error of "5 arguments were passed to function which expects between 2 and 4." because you are passing to the index function 5 arguments when it was expected to have between 2 and 4.
For the solution, delete the last argument of your index formula and upload your file again. That worked for me.
Good luck!
Fernando
- Anonymous5 years agoNot applicable
User might not understand deleting the fifth argument so I am giving below what I had and What I changed and it worked for the refresh. May be it is time to update the Onpremise Gateway. :)) I am afraid I forgot the password and stuff. :))
Before:
= Table.AddIndexColumn(#"Changed Type", "Index.1", 1, 1, Int64.Type)
After:
= Table.AddIndexColumn(Source, "Index", 1, 1)
Hope it helps!
- Anonymous5 years agoNot applicable
Sorry I tried to recreate the problem so the new Index.1 column got added. Use as below.
Before:
= Table.AddIndexColumn(#"Changed Type", "Index", 1, 1, Int64.Type)
After:
= Table.AddIndexColumn(Source, "Index", 1, 1)
- Anonymous5 years agoNot applicable
This worked nicely for me 🙂 thank you for posting the solution