Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowJuly 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more
Getting an error when trying to sort day name by day of week in Excel power query. Anyone else had this?
============================
Error Message:
============================
The end of the input was reached.
----------------------------
The end of the input was reached.
============================
Call Stack:
============================
at Microsoft.AnalysisServices.AdomdClient.AdomdConnection.XmlaClientProvider.Microsoft.AnalysisServices.AdomdClient.IExecuteProvider.ExecuteTabular(CommandBehavior behavior, ICommandContentProvider contentProvider, AdomdPropertyCollection commandProperties, IDataParameterCollection parameters)
at Microsoft.AnalysisServices.AdomdClient.AdomdCommand.ExecuteReader(CommandBehavior behavior)
at Microsoft.AnalysisServices.BackEnd.DataModelingSandboxConnection.AdomdConnectionManager.ExecuteWithRetry[T](Func`1 function)
at Microsoft.AnalysisServices.BackEnd.DataModelingSandboxConnection.AdomdConnectionManager.ExecuteReader(String commandText, CommandParameters parameters, CommandBehavior behavior)
at Microsoft.AnalysisServices.BackEnd.DataModelingSandbox.IsSortByAllowed(DataModelingColumn targetColumn, DataModelingColumn sourceColumn)
at Microsoft.AnalysisServices.BackEnd.DataModelingColumnAmo.SetOrderByColumnInternal(DataModelingColumn sourceColumn)
at Microsoft.AnalysisServices.BackEnd.DataModelingColumnAmo.SetOrderByColumn(DataModelingColumn sourceColumn)
----------------------------
at Microsoft.AnalysisServices.BackEnd.DataModelingColumnAmo.SetOrderByColumn(DataModelingColumn sourceColumn)
at Microsoft.AnalysisServices.Common.SortOrderByColumnData.CreateSortOrder(DataModelingColumn targetColumn, DataModelingColumn sourceColumn)
at Microsoft.AnalysisServices.Common.SortOrderDialog.btnCreate_Click(Object sender, EventArgs e)
============================
Solved! Go to Solution.
Hi @gooranga1
For the same [day of week], there are many same values of [day name sort].
It may cause the error when sorting.
Please assign other columns along with the [day of week] to sort [day name sort], like combine [day of week] and [number of week in a year] to sort [day name sort].
Best Regards
Maggie
Hi @gooranga1
For the same [day of week], there are many same values of [day name sort].
It may cause the error when sorting.
Please assign other columns along with the [day of week] to sort [day name sort], like combine [day of week] and [number of week in a year] to sort [day name sort].
Best Regards
Maggie
oh ok. that is different to how power bi desktop works then which just needs the 2 columns to have only unique pairings so 1 is always Monday for instance.
Thanks
Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.
Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.