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

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

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
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Community User Group Member Badges

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

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (6,898)