If you are using a Data table in Power Apps, you might need to sort its data according to various requirements, such as sorting the table in ascending, descending, or alphabetical order.
In Power Apps, it’s quite easy to sort data alphabetically or based on any column name (e.g., Employee Name), where the first character of the name is used to sort.
But what if you want to sort the Power Apps Data table by a SharePoint choice field? Yes, I also learned this while working on a client task, where he instructed me to sort the Power Apps data table information in descending order based on SharePoint choice values.
In this article, I will tell you how to sort Power Apps Data table based on SharePoint Choice column in two different methods. Such as:
- Add and sort a new column on the Power Apps Data table Items property (Method-1)
- Add and sort a new column in a Power Apps Collection (Method-2)
Sort Power Apps Data Table Based On SharePoint Choice Column
Here, I have a SharePoint list named IT Hardware Issues that contains various columns (like Text, Multiline text, Date time). Among them is a choice field called Device Type, which includes some choices like Laptop, Monitor, Printer, etc.

In Power Apps, there is a Data table control with all the SharePoint list data. I want to sort the Power Apps Data table based on the SharePoint Choice value (Device Type).

To work around this, we can use any of the two methods below.
Method – 1: [Add a New Column & Sort On Power Apps Data Table Items Property]
1. Select the Power Apps Data table control and set its Items property to the code below:
SortByColumns(
AddColumns(
'IT Hardware Issues',
DeviceTypeValue,
'Device Type'.Value
),
"DeviceTypeValue",
SortOrder.Descending
)
Where,
- AddColumns() = Power Apps AddColumns function adds a column to a table. To learn more, refer to this complete tutorial link.
- DeviceTypeValue = New Column Name
- DeviceType = SharePoint Choice Field Name
- “DeviceTypeValue” = Ensure to enclose the new column name with an inverted comma (“”)
- SortOrder.Descending = Provide the sort order that you want, either in ascending or descending

2. Save, publish, and preview the app. The Power Apps Data table has been sorted in descending order by the SharePoint Choice values.
Method – 2: [Create a Collection, Add a New Column & Sort Power Apps Data Table]
The second alternative method for sorting the Power Apps Data table by SharePoint Choice value is to create a new collection and call that collection from the Data table’s Items property.
1. Let’s create a Power Apps collection on the App’s OnStart property. You can also create the collection on a Button’s OnSelect or the Screen’s OnVisible property.
ClearCollect(
colDeviceType,
SortByColumns(
AddColumns(
'IT Hardware Issues',
DeviceTypeValue,
'Device Type'.Value
),
"DeviceTypeValue",SortOrder.Descending
)
)
Where,
colDeviceType = Power Apps Collection Name

2. Select the Data table control and set its Items property as:
colDeviceType

3. As we have created the collection on App’s OnStart property, we need to run it (App -> … Elipses -> Run OnStart). Then, you can see the data table has sorted by the choice field in descending order.

These are the two different approaches to sorting the data table in Power Apps based on the SharePoint Choice field value. Method 1 is best for best practices and to reduce code and time. Method 2 is the best approach if you face any Power Apps delegation warning issues.
I hope you found this article useful.
Also, you may like some more Power Apps articles:
- Display Only Office 365 Active Users In Power Apps Combo Box
- Check If A User Exists In Organization Through Power Apps Office 365 Users
- Show Hide Power Apps Form Based On Gallery Selected Item
- Filter Power Apps Data Table using Checkbox
- Display SharePoint Lookup Field in Power Apps Data Table
- Sum Column in Power Apps Data Table
- Set Alternate Row Color in Power Apps Data Table

Hey! I’m Bijay Kumar, founder of SPGuides.com and a Microsoft Business Applications MVP (Power Automate, Power Apps). I launched this site in 2020 because I truly enjoy working with SharePoint, Power Platform, and SharePoint Framework (SPFx), and wanted to share that passion through step-by-step tutorials, guides, and training videos. My mission is to help you learn these technologies so you can utilize SharePoint, enhance productivity, and potentially build business solutions along the way.