Showing results for 
Search instead for 
Did you mean: 
New Member

Index column breaks Gateway refresh

I have built a very basic model, and added Index columns to my dimension tables to allow me to replace descriptive text fields in my data table with simple integer fields.

Refresh in Desktop works no problem, but when I publish to the Service, and rely on a Gateway refresh I get the following error:


Something went wrong
There was an error when processing the data in the dataset.
Please try again later or contact support. If you contact support, please provide these details.
Data source error: {"error":{"code":"DM_GWPipeline_Gateway_MashupDataAccessError","pbi.error":{"code":"DM_GWPipeline_Gateway_MashupDataAccessError","parameters":{},"details":[{"code":"DM_ErrorDetailNameCode_UnderlyingErrorCode","detail":{"type":1,"value":"-2147467259"}},{"code":"DM_ErrorDetailNameCode_UnderlyingErrorMessage","detail":{"type":1,"value":"5 arguments were passed to a function which expects between 2 and 4."}},{"code":"DM_ErrorDetailNameCode_UnderlyingHResult","detail":{"type":1,"value":"-2147467259"}},{"code":"Microsoft.Data.Mashup.ValueError.Arguments","detail":{"type":1,"value":"{Table.FromRecords({}), \"Index\", 1, 1, number}"}},{"code":"Microsoft.Data.Mashup.ValueError.Reason","detail":{"type":1,"value":"Expression.Error"}}],"exceptionCulprit":1}}} Table: Services.
Cluster URI:
Activity ID: bc932015-9bd2-44c2-8d1a-80af5048f81b
Request ID: c442d6fa-8f65-0f71-c491-48659809d2d7
Time: 2020-07-21 23:06:28Z


If I remove the Index columns everything refreshes fine.

Does anyone know what might be causing this?

Continued Contributor
Continued Contributor

Hi @Tancredii 


As you mentioned, delete the last argument in Power Query Editor for your index function will do.


However, for it to be a permanent solution, you have to update your data gateway to the latest version. As Power BI Desktop updates (in this case the index function includes a new parameter), the data gateway has to be updated as well.


This was my post a few weeks back noting the same thing.


Frequent Visitor

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!


This worked nicely for me 🙂 thank you for posting the solution

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. :))



= Table.AddIndexColumn(#"Changed Type", "Index.1", 1, 1, Int64.Type)


= Table.AddIndexColumn(Source, "Index", 1, 1)


Hope it helps!

Sorry I tried to recreate the problem so the new Index.1 column got added. Use as below. 


= Table.AddIndexColumn(#"Changed Type", "Index", 1, 1, Int64.Type)


= Table.AddIndexColumn(Source, "Index", 1, 1)

Frequent Visitor

Hi everyone! Did anybody solve this issue? Thanks!

New Member

I'm getting this as well. It doesn't seem like connectivity with the gateway as that all used to work until i introduced an index column. Could it be an issue between PowerBI Desktop version we developed on, and the gateway version?

Community Support
Community Support

hi @Tancredii 

If you could delete the dataset in power bi service and then republish the new report to power bi service try it again.




Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Attempted to carry out removing from the service and then republishing with no success.

Super User IV
Super User IV

Helpful resources


Happy New Year from Power BI

This is a must watch for a message from Power BI!

December Update

Check it Out!

Click here to read more about the December 2020 Updates!

Community Blog

Check it Out!

Click here to read the latest blog and learn more about contributing to the Power BI blog!

Get Ready for Power BI Dev Camp

Get Ready for Power BI Dev Camp

Mark your calendars and join us for our next Power BI Dev Camp!.

Top Solution Authors