Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
gooranga1
Power Participant
Power Participant

Sort by column error in Excel power query

Getting an error when trying to sort day name by day of week in Excel power query. Anyone else had this?

 

Annotation 2020-07-02 151349.png

 

============================
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)

============================

1 ACCEPTED SOLUTION
v-juanli-msft
Community Support
Community Support

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

View solution in original post

2 REPLIES 2
v-juanli-msft
Community Support
Community Support

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 

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors