Forum Discussion
Mederic
1 year agoPost Patron
Subtotals and Sort
Hello everyone, I tried to reproduce the exercise in the video in this link. The problem is that in my case, the sorting is done in the Product column but not in the other columns. For example, th...
- 1 year ago
Although I could not reproduce your problem with your data and your M-Code, Table.Group is not guaranteed to keep the original sort order.
So I cannot test this workaround. However, I would try adding an Index column after the Main Table step (and deleting after the last step).
ronrsnfld
1 year agoSuper User
In your uploaded file, I find:
- The worksheet table is incorrectly sorted as you show when I first open it.
- Both tables in Power Query are correctly sorted.
- Refreshing the table in the worksheet results in it showing the correct sort order on the worksheet.
I am at a loss since I cannot reproduce your issue.
Although, as lbendlin pointed out, the sort order may not be retained in Power BI, I've never seen that happen in Excel.