logo
search
Others

How to Sort a Power Apps Gallery by Creation Date

Partner EditorPartner Editor Oct 8, 2026 869 views

Question details

The user wants to organize a gallery in Power Apps so that the items are sorted chronologically based on their creation date instead of the default title sorting.

How to Sort a Power Apps Gallery by Creation Date
Product
Microsoft Power Apps
Device & OS
not provided
Scenario
Developing or customizing an application in Power Apps and managing how data is displayed in a gallery component.
Observed behavior
The gallery displays items, but needs a specific formula applied to the Items property to reorder them by the creation date column.
Before you start

Ensure you have edit permissions for the Power App and know the exact internal name of your data source's creation date column, which is typically "Created".

Solution 1Recommended

Use the SortByColumns Function in the Items Property

Apply the SortByColumns function combined with your existing Filter formula to sort the gallery by the creation date.

To properly sort a gallery, you must modify its Items property. By default, galleries might sort by a primary column like 'Title'. Wrapping your data source or filter formula in the SortByColumns function allows you to specify the exact column and order for your items.

1
Select the Gallery Control

Open your app in the Power Apps editing canvas and click on the Gallery control you want to sort.

2
Locate the Items Property

Navigate to the Properties pane on the right or use the formula bar at the top to select the 'Items' property.

3
Apply the SortByColumns Formula

Modify the existing formula to include SortByColumns. For example, enter: SortByColumns(Filter(YourDataSource, YourCondition), "Created", SortOrder.Descending). Replace 'YourDataSource' and 'YourCondition' with your specific app details.

4
Adjust the Sort Order

If you want the oldest items to appear first instead of the newest, change 'SortOrder.Descending' to 'SortOrder.Ascending'.

Use the SortByColumns Function in the Items Property
Dynamic Sorting: You can make the sort order dynamic by linking it to a variable or a toggle control, such as using If(SortDescending1, SortOrder.Descending, SortOrder.Ascending) in place of a fixed sort order.
Free Microsoft Office alternative

Boost Your Productivity with WPS Office

While Power Apps handles your custom business applications, you still need a reliable suite for daily documents, spreadsheets, and presentations. WPS Office offers a free, lightweight, and highly compatible alternative to Microsoft Office.

Seamless compatibility with Microsoft Word, Excel, and PowerPoint formats (.docx, .xlsx, .pptx).Built-in PDF editing tools for easy document management and conversions.Lightweight installation that runs smoothly on Windows, Mac, Linux, iOS, and Android.Familiar user interface requiring zero learning curve for Office users.
microsoft office alternative - wps office

Frequently Asked Questions

Why is my Power Apps gallery not sorting by the Created column?

This usually happens if the column name is misspelled or if you are using the display name instead of the logical internal name. Ensure you use the exact internal name (e.g., "Created") enclosed in double quotes.

Can I sort by multiple columns in a Power Apps gallery?

Yes, you can add multiple column names and sort orders within the SortByColumns function, separated by commas, such as SortByColumns(DataSource, "Column1", SortOrder.Ascending, "Column2", SortOrder.Descending).

How do I toggle between ascending and descending sort order?

You can use an icon or toggle control that updates a context variable (e.g., UpdateContext({SortDescending: !SortDescending})), and use an If statement in your SortByColumns formula to switch between SortOrder.Descending and SortOrder.Ascending dynamically.