cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
andrew260z
Level: Powered On

Another multiple filtering question

Just looking at some other examples on this forum but struggling to get this statement right;

 

I have a toggle for a "Contractor" column being either "Yes" or "No" depending on a toggle on the page, can I somehow fit that into the Filter statement?

 

SortByColumns(
    Filter(
        VisitorSignInList,
        Lastname = SiteCode
    ),
    "SignInDate",
    If(
        SortDescending1,
        Ascending,
        Descending
    ),
    "SignInTime"
)
1 ACCEPTED SOLUTION

Accepted Solutions
Mike8
Level 10

Re: Another multiple filtering question

Hello andew260z,

Does this work for you?

SortByColumns(
    Filter(
        VisitorSignInList,
        Lastname = SiteCode&&Contractor=Toggle1.Value
    ),
    "SignInDate",
    If(
        SortDescending1,
        Ascending,
        Descending
    ),
    "SignInTime"
) 

In order to try it, you need to replace Toggle1 with the actual name of your toggle control

View solution in original post

4 REPLIES 4
Super User
Super User

Re: Another multiple filtering question

Hi Andrew,

Is your data from Sharepoint?  Is your expression the Items property of a gallery or datatable?

andrew260z
Level: Powered On

Re: Another multiple filtering question

Yes that is right its a SharePoint list, data is presented in a gallery at the moment.

Mike8
Level 10

Re: Another multiple filtering question

Hello andew260z,

Does this work for you?

SortByColumns(
    Filter(
        VisitorSignInList,
        Lastname = SiteCode&&Contractor=Toggle1.Value
    ),
    "SignInDate",
    If(
        SortDescending1,
        Ascending,
        Descending
    ),
    "SignInTime"
) 

In order to try it, you need to replace Toggle1 with the actual name of your toggle control

View solution in original post

andrew260z
Level: Powered On

Re: Another multiple filtering question

Sorry for the delayed response - yes works, I didn't realise that was possible to do the compound conditions for a filter. Thanks!

Helpful resources

Announcements
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

Power Apps 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

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (2,971)