cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
FinnCato
Level: Power Up

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
Highlighted
PowerApps Staff CarlosFigueira
PowerApps Staff

Re: Need help with sorting by date

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
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors
Users Online
Currently online: 191 members 6,389 guests
Please welcome our newest community members: