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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / filtering a gallery wi...
Power Apps
Answered

filtering a gallery with mulitple dropdowns (cascade)

(0) ShareShare
ReportReport
Posted on by

i want to filter a gallery based on three dropdowns. 

1.The first dropdown is month as a text.

2.The second dropdown are projectnames but they are not in the same table like the others, because the projectname come from external table called Projects. But every description in the collection has a description which is based on a Projectname. 

3.The third are the descriptions of the projects ?

Akki2995_0-1697441124772.png

 

ort(
 If(IsBlank(Dropdown3.Selected.DateMonthYear) && IsBlank(Dropdown4.Selected.Arbeitspaket); 
 Filter(colF; Mitarbeiter = User().Email); 
 If(IsBlank(Dropdown3.Selected.DateMonthYear);
 Filter(colF;Mitarbeiter = User().Email && Arbeitspaket = Dropdown4.Selected.Arbeitspaket);Filter(colF; Mitarbeiter = User().Email && Monat = Dropdown3.Selected.DateMonthYear)
 )
 ); 
 "Monat"; 
 SortOrder.Descending
)

 

  hope someone can help me 😞

Categories:
I have the same question (0)
  • AndrewR1 Profile Picture
    1,572 Moderator on at

    Hi @Anonymous can you try structuring the code like so: 

    Sort(
     If(
     IsBlank(Dropdown3.Selected.DateMonthYear) && IsBlank(Dropdown4.Selected.Arbeitspaket); 
     Filter(
     colF; 
     Mitarbeiter = User().Email
     ); 
     If(
     IsBlank(Dropdown3.Selected.DateMonthYear);
     Filter(
     colF;
     Mitarbeiter = User().Email ;
     Arbeitspaket = Dropdown4.Selected.Arbeitspaket
     );
     Filter(
     colF; 
     Mitarbeiter = User().Email;
     Monat = Dropdown3.Selected.DateMonthYear
     )
     )
     ); 
     "Monat"; 
     SortOrder.Descending
    )

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. Remember, you can accept more than one post as a solution.

     

    If the content was useful in other ways, please consider giving it Thumbs Up.

     

    Thanks
    Andrew

  • Community Power Platform Member Profile Picture
    on at

    there is no bug but it do not work ! 

    The gallery is not filtered based on these both columns !

  • AndrewR1 Profile Picture
    1,572 Moderator on at

    Hi @Anonymous if you wish to have them both filter when they are not blank we needed to add the other filter to the else part of the last IF my apologies: 

    Sort(
     If(
     IsBlank(Dropdown3.Selected.DateMonthYear) && IsBlank(Dropdown4.Selected.Arbeitspaket); 
     Filter(
     colF; 
     Mitarbeiter = User().Email
     ); 
     If(
     IsBlank(Dropdown3.Selected.DateMonthYear);
     Filter(
     colF;
     Mitarbeiter = User().Email ;
     Arbeitspaket = Dropdown4.Selected.Arbeitspaket
     );
     Filter(
     colF; 
     Mitarbeiter = User().Email;
     Monat = Dropdown3.Selected.DateMonthYear,
     Arbeitspaket = Dropdown4.Selected.Arbeitspaket
     )
     )
     ); 
     "Monat"; 
     SortOrder.Descending
    )

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. Remember, you can accept more than one post as a solution.

     

    If the content was useful in other ways, please consider giving it Thumbs Up.

     

    Thanks
    Andrew

  • Community Power Platform Member Profile Picture
    on at

    the problem is now that it does not filter the date alone anymore!

  • AndrewR1 Profile Picture
    1,572 Moderator on at

    Hi @Anonymous 

    Sort(
     If( IsBlank(Dropdown3.Selected.DateMonthYear) && IsBlank(Dropdown4.Selected.Arbeitspaket); 
     Filter(
     colF; 
     Mitarbeiter = User().Email
     ); 
     If( IsBlank(Dropdown3.Selected.DateMonthYear);
     Filter(
     colF;
     Mitarbeiter = User().Email ;
     Arbeitspaket = Dropdown4.Selected.Arbeitspaket
     );
     If( IsBlank(Dropdown4.Selected.Arbeitspaket);
     Filter(
     colF;
     Mitarbeiter = User().Email ;
     Monat = Dropdown3.Selected.DateMonthYear
     );
     Filter(
     colF; 
     Mitarbeiter = User().Email;
     Monat = Dropdown3.Selected.DateMonthYear;
     Arbeitspaket = Dropdown4.Selected.Arbeitspaket
     )
     )
     )
     ); 
     "Monat"; 
     SortOrder.Descending
    )

     

    You would just add another if to check if each of them are blank and then the final if neither of them are blank then filter by both

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. Remember, you can accept more than one post as a solution.

     

    If the content was useful in other ways, please consider giving it Thumbs Up.

     

    Thanks
    Andrew

  • Community Power Platform Member Profile Picture
    on at

    thx but why the gallery is not filtered based on the date ? 

    the date there is a text type 

  • Verified answer
    AndrewR1 Profile Picture
    1,572 Moderator on at

    Hi @Anonymous I don't know for sure as you haven't shared with me any of the data for the: 

    Dropdown3.Selected.DateMonthYear

    But I would say you need to make sure the format of the text is correct for both the Monat field which I can see is yyyy/MM:

    AndrewR1_0-1697531233422.png

    so your dropdown would also need to have the month in numeric and the year to be able to have a successful match. 

    You could also try adding in the Not operator to make sure that each field is running the correct if: 

    Sort(
     If( IsBlank(Dropdown3.Selected.DateMonthYear) && IsBlank(Dropdown4.Selected.Arbeitspaket); 
     Filter(
     colF; 
     Mitarbeiter = User().Email
     ); 
     If( IsBlank(Dropdown3.Selected.DateMonthYear)&&!IsBlank(Dropdown4.Selected.Arbeitspaket);
     Filter(
     colF;
     Mitarbeiter = User().Email ;
     Arbeitspaket = Dropdown4.Selected.Arbeitspaket
     );
     If( IsBlank(Dropdown4.Selected.Arbeitspaket)&&!IsBlank(Dropdown3.Selected.DateMonthYear);
     Filter(
     colF;
     Mitarbeiter = User().Email ;
     Monat = Dropdown3.Selected.DateMonthYear
     );
     Filter(
     colF; 
     Mitarbeiter = User().Email;
     Monat = Dropdown3.Selected.DateMonthYear;
     Arbeitspaket = Dropdown4.Selected.Arbeitspaket
     )
     )
     )
     ); 
     "Monat"; 
     SortOrder.Descending
    )

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. Remember, you can accept more than one post as a solution.

     

    If the content was useful in other ways, please consider giving it Thumbs Up.

     

    Thanks
    Andrew

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard