cancel
Showing results for 
Search instead for 
Did you mean: 

Adding index causes dataflow to fail

Run into an unexpected refrhsh failure this morning and was able to isolate is to index creation with the simple script below.

 

Run timeDataflow nameDataflow refresh statusEntity nameStart timeEnd timeEntity refresh statusError
08/02/2020 10:14IndexFailFailedQuery02/08/2020 10:1402/08/2020 10:14FailedError: 5 arguments were passed to a function which expects between 2 and 4... RootActivityId = 78c6f17c-1fe6-4fa6-a040-55319f036eb5

 

Script:

 

let
  Source = {1..10},
  #"Converted to table" = Table.FromList(Source, Splitter.SplitByNothing(), nullnull, ExtraValues.Error),
  #"Changed column type" = Table.TransformColumnTypes(#"Converted to table", {{"Column1"type text}}),
  #"Added index" = Table.AddIndexColumn(#"Changed column type", "Index"01, Int64.Type)
in
  #"Added index"
Status: New
Comments
Community Support

@Banzai ,

 

I could refresh the dataflow without any issue. Do you have other data sources in your report?

 

Regards,

Jimmy Tao

MVP

I've found exactly the same problem when using Table.AddIndexColumn.

Works fine in PBI Desktop, but will not refresh from the service.

The workaround is to remove the 5th parameter (the datatype, Int64.Type) and add that as a subsequent step in Power Query.

 

Microsoft please look into this as it is definitely a problem with PQ in the service.

Regular Visitor

No, no other datasources in this particular dataflow. Removing the index creation line resolves the problem and the dataflow runs fine. Can apply the workaround that @alexwhittles just posted. Thanks!

MVP

Found the problem that was causing mine to fail; running an older gateway.

The July 2020 gateway (3000.51.7) is required to support 5 parameters. I updated to that and it works ok after that.

Alex