Forum Discussion
Add Index Function causes refresh to fail
- 6 years ago
Try without the column type
#"Added Index" = Table.AddIndexColumn(#"Sorted Rows", "Index", 1, 1)
- 6 years ago
Hi darentengmfs ,
As lbendlin said: Removing this newly added optional 5th parameter should solve the issue.
Alternatively you have to update the gateway in the service to the newest version. That should fix the problem as well.
Hi Greg_Deckler and parry2k
I have accidentally marked your post as solution.
Nonetheless, here are the lines before and after my Index. I have replied my full m script but it was taken down because someone reported it as spam so this would just be the last few lines.
#"Expanded inventItemGroup" = Table.ExpandTableColumn(#"Merged Queries1", "inventItemGroup", {"Item Group"}, {"Item Group"}),
#"Filtered Rows" = Table.SelectRows(#"Expanded inventItemGroup", each ([Item Group] <> "AAA" and [Item Group] <> "BBB") and ([Warehouse] = "100" or [Warehouse] = "200" or [Warehouse] = "300" or [Warehouse] = "400")),
#"Filtered Rows1" = Table.SelectRows(#"Filtered Rows", each [On Hand] >= 0),
#"Sorted Rows" = Table.Sort(#"Filtered Rows1",{{"Inventory Value", Order.Descending}}),
#"Added Index" = Table.AddIndexColumn(#"Sorted Rows", "Index", 1, 1, Int64.Type)
in
#"Added Index"
Also, I do have Pro license but I have never been able to submit a ticket. I had to go through my Power BI Administrator to submit one.
darentengmfs don't see any issue though. can you remove sort step and then add index. Can you test it, please?