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 / use simultaneous filters
Power Apps
Answered

use simultaneous filters

(0) ShareShare
ReportReport
Posted on by

Hello, guys, I have two questions, is there a way I can use this code below with the filters at the same time?

 

 

And second, can the date be activated with today's date + 7 and show in the gallery?

 

 

Here my code:

 

If(
 radioporcentagem.Selected.Value = "Maior";
 Sort(
 collTaskListForGallery;
 TrabalhoPercentualdaTarefaConcluído;
 Descending
 );
 radioporcentagem.Selected.Value = "Menor";
 Sort(
 collTaskListForGallery;
 TrabalhoPercentualdaTarefaConcluído;
 Ascending
 );
 radiorodemOM.Selected.Value = "Maior";
 Sort(
 collTaskListForGallery;
 OrdemdeManutenção;
 Descending
 );
 radiorodemOM.Selected.Value = "Menor";
 Sort(
 collTaskListForGallery;
 OrdemdeManutenção;
 Ascending
 );
 toggle_porcentagem.Value = true;
 Sort(
 collTaskListForGallery;
 TrabalhoPercentualdaTarefaConcluído;
 Ascending
 );
 toggle_porcentagem.Value = false;
 Sort(
 collTaskListForGallery;
 TrabalhoPercentualdaTarefaConcluído;
 Descending
 );Filter(collTaskListForGallery;
 DateValue(DatadeInícioRealdaTarefa)=DatePicker1.SelectedDate))

 

 

Thank you for your help.

 

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

    Hi @Gorilla_8 :

    Can you tell me :

    • Do you want to fuse these two codes? (Filtering the sorted tables?)
    • What is “The Date” means?( And second, can the date be activated with today's date + 7 and show in the gallery?)  Do you want to show the specified date (today's date + 7 ) in the gallery?
    • What is your sort rule? What are the priorities of these three variable (radioporcentagem.Selected.Value, radiorodemOM.Selected.Value, toggle_porcentagem.Value)?

    I’ve made a test for your reference(In my test, I just adjusted the structure of your code without changing the logic of the code.):

    Step1:set the gallery control’s items property to:

     

    Filter(
     If(
     radioporcentagem.Selected.Value = "Maior";
     Sort(
     collTaskListForGallery;
     TrabalhoPercentualdaTarefaConcluído;
     Descending
     );
     radioporcentagem.Selected.Value = "Menor";
     Sort(
     collTaskListForGallery;
     TrabalhoPercentualdaTarefaConcluído;
     Ascending
     );
     radiorodemOM.Selected.Value = "Maior";
     Sort(
     collTaskListForGallery;
     OrdemdeManutenção;
     Descending
     );
     radiorodemOM.Selected.Value = "Menor";
     Sort(
     collTaskListForGallery;
     OrdemdeManutenção;
     Ascending
     );
     toggle_porcentagem.Value = true;
     Sort(
     collTaskListForGallery;
     TrabalhoPercentualdaTarefaConcluído;
     Ascending
     );
     toggle_porcentagem.Value = false;
     Sort(
     collTaskListForGallery;
     TrabalhoPercentualdaTarefaConcluído;
     Descending
    ) );DateValue(DatadeInícioRealdaTarefa)=DatePicker1.SelectedDate))

     

    Step2:add a label into the gallery control and set it’s text property to:

    "The Date:"&DateAdd(Today();7;Days)

    The following picture is my result, is this what you want?

     

     1.PNG

     

    Best Regards,

    Bof

  • Gorilla_8 Profile Picture
    on at

    Hi @v-bofeng-msft , thanks for the reply!

     

    • Do you want to fuse these two codes? (Filtering the sorted tables?)Yes, i want fuse all the filters and when the user click in one button reset all filters.
    • What is “The Date” means?( And second, can the date be activated with today's date + 7 and show in the gallery?)  Do you want to show the specified date (today's date + 7 ) in the gallery?Yes, I want to show activate today's date + 7 in the gallery + the toggle_porcentagem.Value activate if is possible, and once again reset when click a button

    • This code didn't work very well, I need to show a filter by date when a value on dropdown is selected


    • And one more question, if its okay(dont need answer if you dont want), there is way to the user can use multiple filters at the same time, for example:

       

       

       

       

       

       

       

       


      I have a dropdown called "drpFilter" and when more than one value is selected, will it be added as a filter in the gallery, instead of restarting the gallery?

    • Thanks again for the help! You help me out, a lot!
  • v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @Gorilla_8 :

    Can you describe your filtering rules and sort rules in detail?

    About "when the user click in one button reset all filters""and once again reset when click a button"

    Can you tell me what the default status is?

    "I want to show activate today's date + 7 in the gallery "

    You can implement it in step 2 that I mationed above.

    About "use multiple filters at the same time"

    I think this formula is what you need.

     

    Filter( Table; Formula1 [; Formula2; ... ] )

     

    In addition,you can use filter founction nested,like:

     

    filter(filter(filter(table;foumular1);formular2);farmular3)

     

    I think this link will help you a lot:

    Filter, Search, and LookUp functions in Power Apps:https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-filter-lookup

     

    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 243 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 190 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 135

Last 30 days Overall leaderboard