web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Multiple filters in a ...
Power Apps
Answered

Multiple filters in a gallery stuck at the toggle function

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hello!

 

The Searchbox and Comboboxes works fine, but now I got stuck at the "toggle" function. I want to be able to fast toggle so when I put it "on" then I want it to show specifik stuff in both "Agreementarea" and "Status". Can someone correct this formula for me?

toggle filter.png

FirstN(Filter(
 Sort(
 'Logg';
'Received';
 Descending);
 Searchbox.Text in 'Case' & 'Time' & 'Name';
 Agreementarea.Value in ComboBox2.SelectedItems.Value ;
 Status.Value in ComboBox2_2.SelectedItems.Value;
 'Toggle'.Value in Agreementarea.Value in "West";
 'Toggle'.Value in Status.Value in "Done"
 );100)

 

Categories:
  • Verified answer
    v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous :

    Do you want to modify the filter criteria based on the selection of'Toggle'?

    Case1:'Toggle'.Value=ture

     

    FirstN(Filter(
     Sort(
     'Logg';
    'Received';
     Descending);
     Searchbox.Text in 'Case' & 'Time' & 'Name';
    Agreementarea.Value = "West";
    Status.Value = "Done"
     );100)

     

    Case2:'Toggle'.Value=false

     

    FirstN(Filter(
     Sort(
     'Logg';
    'Received';
     Descending);
     Searchbox.Text in 'Case' & 'Time' & 'Name';
     Agreementarea.Value in ComboBox2.SelectedItems.Value ;
     Status.Value in ComboBox2_2.SelectedItems.Value
     );100)

     

    If so,please try this code:

     

    If('Toggle'.Value;
    FirstN(Filter(
     Sort(
     'Logg';
    'Received';
     Descending);
     Searchbox.Text in 'Case' & 'Time' & 'Name';
    Agreementarea.Value = "West";
    Status.Value = "Done"
     );100);
    FirstN(Filter(
     Sort(
     'Logg';
    'Received';
     Descending);
     Searchbox.Text in 'Case' & 'Time' & 'Name';
     Agreementarea.Value in ComboBox2.SelectedItems.Value ;
     Status.Value in ComboBox2_2.SelectedItems.Value
     );100))

     

    Best Regards,

    Bof

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 221 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 188 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 120

Last 30 days Overall leaderboard