cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
FinnCato
New Member

Need help with sorting by date

Need help with sorting by date, but also for a field contained in a sharpoint document where the collon is called billed how This is what is in the field today: SortByColumns(Filter('Hva skjer'; StartsWith(Antall;TextSearchBox1.Text)); "Antall"; If(SortDescending1; Descending; Ascending))

1 REPLY 1
CarlosFigueira
Power Apps
Power Apps

You can pass multiple columns to the SortByColumn function, and the sort will be done by all those columns. For example, in this expression:

SortByColumns(
    Filter('Hva skjer'; StartsWith(Antall;TextSearchBox1.Text));
    "DateColumnName";
    If(SortDescending1; Descending; Ascending)
    "Antall";
    If(SortDescending1; Descending; Ascending))

Will first sort the list 'Hva skjer' by the column 'DateColumnName' (ascending or descending, depending on the toggle variable), and if there are items with the same date, it will use the column 'Antall' to "break the tie".

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Users online (1,238)