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 / filtering a gallery wi...
Power Apps
Answered

filtering a gallery with mulitple dropdowns (cascade)

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

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:
  • 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
    Microsoft Employee 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
    Microsoft Employee 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
    Microsoft Employee 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

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

#2
M Bilal Khan Profile Picture

M Bilal Khan 320

#3
Mohsin Ali Profile Picture

Mohsin Ali 246

Last 30 days Overall leaderboard