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 / How to filter gallery ...
Power Apps
Answered

How to filter gallery by optionset datatype dropdown?

(0) ShareShare
ReportReport
Posted on by 36

I am trying to filter a gallery by dropdown, on an option set data type. SKUs is the entity. Manufacturer is the option set. 

The code below adds the dropdown items (with an all result) into the dropdown:

 

ClearCollect(collectManufacturer1, Choices('SKUs'.Manufacturer));
ClearCollect(collectManufacturer,ShowColumns(AddColumns(collectManufacturer1,"Result",Text(Value)),"Result"));
Collect(collectManufacturer,{Result:"All"});

 

 

The code below is for filtering my gallery:

 

 Filter(SKUs,
 Manufacturer = 'Manufacturing Site Dropdown_1'.Selected.Result,
 ),

 


However I get an error on the filter: Incompatible type. We can't evaluate your formula because the values being compared in the formula aren’t the same type.

Can anybody please point me in the right direction in fixing this error?

Categories:
  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    Hi @bennstef 

    It looks like you have extraneous commas in your gallery Items property, this may fix it. 

    Filter(SKUs,
     Manufacturer = 'Manufacturing Site Dropdown_1'.Selected.Result
     )

    If not, try wrapping both sides of the equation in the Text() function

    Filter(
     SKUs, Text(Manufacturer) = Text('Manufacturing Site Dropdown_1'.Selected.Result)
     )

     

  • Verified answer
    v-yutliu-msft Profile Picture
    Microsoft Employee on at

    Hi @bennstef ,

    Do you want to filter entities based on the selection of the option set field? if select "All", display all items?

    If so, I agree with most part of the formula provided by @Drrickryp , but you need to add the "All" part.

    Try to set the gallery's Items like this:

    If('Manufacturing Site Dropdown_1'.Selected.Result="All",
     SKUs,
     Filter(
     SKUs, Text(Manufacturer) = Text('Manufacturing Site Dropdown_1'.Selected.Result)
     )
    )

     

     

     

    Best regards,

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

#2
WarrenBelz Profile Picture

WarrenBelz 192 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 135

Last 30 days Overall leaderboard