Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago

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: WABI-AUSTRALIA-SOUTHEAST-redirect.analysis.windows.net
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?

10 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    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

    • Anonymous's avatar
      Anonymous
      Not 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!

      • Anonymous's avatar
        Anonymous
        Not 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)

    • Anonymous's avatar
      Anonymous
      Not applicable

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

  • v-lili6-msft's avatar
    v-lili6-msft
    Community Support

    hi Anonymous 

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

     

    Regards,

    Lin

    • Anonymous's avatar
      Anonymous
      Not applicable

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

  • Anonymous's avatar
    Anonymous
    Not applicable

    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?

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi everyone! Did anybody solve this issue? Thanks!

  • Hi Anonymous 

     

    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.

     

    https://community.powerbi.com/t5/Desktop/Add-Index-Function-causes-refresh-to-fail/m-p/1303023#M566735