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
Dual Super User

Re: PowerApps Default Sorting with Values

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
Dual Super User

Re: PowerApps Default Sorting with Values

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
Helper I
Helper I

Re: PowerApps Default Sorting with Values

This worked! 

 

Thanks so much.

Helpful resources

Announcements
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Robotic Process Automation

Let's talk about the solution provided by Microsoft for Robotic Process Automation (RPA)

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

Top Solution Authors
Top Kudoed Authors
Users online (8,331)