Power Fx function

Read and shape data

Top 12 most-used

Sort

Orders rows by a formula.

What it does

The job: Take a table or data source, keep the rows you want, and reshape the columns for display.

Try this

Adapt this formula from the nxtM365 reference hub:

Sort(Orders, Created, Descending)

How to use Sort

Start from the task, not the alphabet. If you are shaping rows for a gallery, reach for Sort alongside the other data functions in its group; if you are saving, navigating, or changing state, use it on an event such as a button OnSelect rather than in a display property. When a formula misbehaves, check for a blank value where you expected text, then confirm the behavior against the examples in the Power Fx function reference hub.

New to the language itself? Read What Is Microsoft Power Fx? first, then come back here when you need this specific tool.

Keep learning

Share this