cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
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
firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

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

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

Top Kudoed Authors
Users Online
Currently online: 370 members 3,914 guests
Recent signins:
Please welcome our newest community members: