cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper I
Helper I

PowerApps Default Sorting with Values

Hello,

 

I have a set of data that is sorted by a column called DataOrder. It is numbered from 1 through 12, see table below for example. The Issue I'm having is that powerapps does not sort it in the way I would expect, from 1 to 12 in order, it actually sorts like this:

1,10,11,12,2,3,4,5,6,7,8,9

 

This is incredibly annoying, since I specifically put in a column called DataOrder to order my data in the way you would expect...

It works the way you would expect for a data set less than 10, since it counts from 1 to 9 and then that's it.

Here is my code for reference: Sort(Table1,DataOrder,SortOrder.Ascending)

 

Does anyone know how I can fix this?

 

 

 

 

DataOrder

1
2
3
4
5
6
7
8
9
10
11
12
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Dual Super User III
Dual Super User III

The problem is that your DataOrder column is a string data type and not an integer.  So the column is sorting alphabetically rather than numerically.  Change the Data type on the column and it should work correctly.  If the list isn't a large one you should also be able to try this formula.  But it won't be delegable.

Sort(Table1,Value(DataOrder),SortOrder.Ascending)

 



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

2 REPLIES 2
Highlighted
Dual Super User III
Dual Super User III

The problem is that your DataOrder column is a string data type and not an integer.  So the column is sorting alphabetically rather than numerically.  Change the Data type on the column and it should work correctly.  If the list isn't a large one you should also be able to try this formula.  But it won't be delegable.

Sort(Table1,Value(DataOrder),SortOrder.Ascending)

 



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

Highlighted

This worked! 

 

Thanks so much.

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (9,717)