Forum Discussion
Add Index Function causes refresh to fail
- 5 years ago
Try without the column type
#"Added Index" = Table.AddIndexColumn(#"Sorted Rows", "Index", 1, 1)
- 5 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.
darentengmfs - I don't see anything obviously wrong with the AddIndexColumn statement. However, try adding a Table.Buffer statement between your Sort and your adding of the index column. Maybe ImkeF has some thoughts.
- Greg_Deckler5 years agoCommunity Champion
darentengmfs - Hmm, I would still recommend the Table.Buffer. It is often the case that the sorting doesn't "stick" and Table.Buffer tends to solve that. I learned that technique from ImkeF and she may have some thoughts here as well, or possibly edhans .
- ImkeF5 years agoCommunity Champion
Absolutely Greg_Deckler ,
thanks for reminding me.
darentengmfs you can check my article here where I've described this dangerous behaviour: https://community.powerbi.com/t5/Community-Blog/Bug-warning-for-Table-Sort-and-removing-duplicates-in-Power/ba-p/810390