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 a combo box and date picker

(0) ShareShare
ReportReport
Posted on by 21

Good morning all,

 

This is my first post so be gentle! I've only just started to learn powerapps and ive found lots of useful help on these forums, but im struggling to find anything to resolve this issue im having. 

 

So i have a gallery of data which comes from a sharepoint list. I want users to be able to filter this data based on a number of Combo boxes and 2 date pickers (So, be able to filter the data between 2 dates selected from a date picker). I want the data to show everything in the first instance and then filter down depending on what is selected from the combo boxes. 

 

I have come up with this formula for the combo boxes using just 2 of them as a start (i have about 6 i want to use in total);

 

Lexicaltje_1-1623392195067.png

 

As you can see there are no errors... But it doesnt work. The IsBlank works, because all the data is shown, but if i filter it no data is shown. the 'Audit Year' and the 'Status' are fields from my sharepoint list, i guess thats where im going wrong...

 

Also, i have a separate formula for the date pickers which i will need to integrate into the above formula, but that doesn't work either and im not sure why; 

 

Lexicaltje_2-1623392342163.png

Again, the 'data' is from a sharepoint list.

 

Both formulas im using in the Items section of the gallery... Apologies, im very new at this! Its something very obvious im sure. 

Categories:
  • WarrenBelz Profile Picture
    156,570 Most Valuable Professional on at

    Hi @Lexicaltje ,

    Try this

    Filter(
     ’Recommendation Tracker’,
     (
     IsBlank(ComboBoxl_5.Selected.Value || 
     'Audit Year' = ComboBox1_5.Selected.Value
     ) &&
     (
     IsBlank(ComboBoxl_6.Selected.Value ||
     Status = ComboBoxl_6.Selected.Value
     )
    )

     

    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. If the content was useful in other ways, please consider giving it Thumbs Up.

  • Lexicaltje Profile Picture
    21 on at

    Hello,

     

    I actually just had it working just by adding .Value after 'Status' and 'Audit year', which is good! But now i have a new problem...

     

    Ive started to write the formula for the rest of the combo boxes, but the same formula isnt working for all of them and i assume its because of the data source. I just get errors. 

     

    'Recommendation Tracker' is a SP List - some of the fields that populate the data in the combo boxes are free text, some are single choice selections (Those are the ones that work), some are multi choice selections and one is a person picker. 

     

    Im getting confused if i need to use Selected, Selecteditems, Selected.Value .Result etc etc.... But for combo boxes where the data in the sharepoint list is free text, multi selection or person picker combo boxes nothing seems to work. 

     

    Again, apologies, as im sure this is obvious to most. 

  • Lexicaltje Profile Picture
    21 on at

    Also @WarrenBelz i tried your solution but it doesn't like the "="... It says its incompatible types for comparison, left is a record and right is text. 

  • Verified answer
    WarrenBelz Profile Picture
    156,570 Most Valuable Professional on at

    Hi @Lexicaltje ,

    Before going any further, please have a read of this blog of mine on Controls and their references. Also forget about SelectedText (it is deprecated) and use Selected. Also .Value is necessary for Choice columns (you did not tell me this in your original post) and if you use the code below, you should also get rid of the Delegation warning.

    Filter(
     ’Recommendation Tracker’,
     (
     IsBlank(ComboBoxl_5.Selected.Value || 
     'Audit Year'.Value = ComboBox1_5.Selected.Value
     ) &&
     (
     IsBlank(ComboBoxl_6.Selected.Value ||
     Status.Value = ComboBoxl_6.Selected.Value
     )
    )

     

    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. If the content was useful in other ways, please consider giving it Thumbs Up.

  • Lexicaltje Profile Picture
    21 on at

    Your blog was very interesting @WarrenBelz thank you, i have managed to get everything working now even the date picker filtering, so im pleased! 

  • WarrenBelz Profile Picture
    156,570 Most Valuable Professional on at

    Hi @Lexicaltje ,

    Please remember to Accept as Solution as this closes the post and makes it easier for others with the same issue to find.

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

#2
Mohsin Ali Profile Picture

Mohsin Ali 329

#3
WarrenBelz Profile Picture

WarrenBelz 187 Most Valuable Professional

Last 30 days Overall leaderboard