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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! 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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors