Skip to main content
Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Unanswered

Filter Dataverse table for an option set value

(0) ShareShare
ReportReport
Posted on by 41

I got a problem with filtering a Dataverse table according to an option set value.
The table is named "People" and there is an option set column named "Gender".
I want to filter Gallery1 ("People" as items) that only the items are shown that matches the option set value "Male".

 

 

 

Filter(People, Gender = 'Gender (People)'.Male)

 

 

 

I tried the above code but it came back with an error: Incompatible types for comparison. These types can't be compared: Table, OptionSetValue (Gender(People)).

 

EDIT UPDATE: I just wanted to mention that my Dataverse column for "Gender" is set up as 'Choices' instead of 'Choice'.

  • Isaque_Matos Profile Picture
    2 on at
    Re: Filter Dataverse table for an option set value

    I went through this same scenario and solved it using "true" or "false".

    And I managed to filter it.

     

    Filter(People, Gender = true)
  • OdinDelToro Profile Picture
    407 on at
    Re: Filter Dataverse table for an option set value

    Hello @minyi,

     

    You can change it to be a choice column instead of choices. At last, it doesn't sound correct that one person can have multiple genders.

     

    If you really need it to be multiple selection, then you can try using Filter(People,Text(First('Gender (People) Multiple Select').Value) = "Male")

    Change the section 'Gender (People) Multiple Select' in the formula to your column name. Anyway, that lead to other issues like delegation. At last, I'll suggest to better change to only one choice selection if possible.

    OdinDelToro_0-1704390561763.png

     

    Hope this helps clarify the doubt, let me know in case you're still facing an issue within it.

    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.

  • minyi Profile Picture
    41 on at
    Re: Filter Dataverse table for an option set value

    The same error still occurs for me - Error: Incompatible types for comparison. These types can't be compared: Table, OptionSetValue (Gender (People)).

     

    I just wanted to mention that my Dataverse column for "Gender" is set up as 'Choices' instead of 'Choice'. It allows for multiple choices.

  • OdinDelToro Profile Picture
    407 on at
    Re: Filter Dataverse table for an option set value

    Hello @minyi,

     

    What's the name of the column on your dataverse table that capture the choices for gender and the name of your choices? 

     

    Here is an example, having a column Gender (People) with global choices for the gender sync with it as Gender (People). 

    OdinDelToro_0-1703257254072.png

    The formula for the Items property is Filter(People, 'Gender (People)' = [@'Gender (People)'].Male)

    OdinDelToro_1-1703257427296.png

     

    Hope this helps clarify the doubt, let me know in case you're still facing an issue within it.

    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.

  • v-qiaqi@microsoft.com Profile Picture
    on at
    Re: Filter Dataverse table for an option set value

    Hi @minyi,

    I think you need to distinguish the difference between Global Choice and Choice column.

    To refer to a Choice column, sometimes, Power Apps expects its logic name as below:

    vqiaqimsft_0-1703166201099.png

    Please find out the logic name of your Choice column

    vqiaqimsft_1-1703166951120.png

     

    On your side, please find out the logic name of your Choice column, and then, make sure you have refer to a correct global option set name.

  • minyi Profile Picture
    41 on at
    Re: Filter Dataverse table for an option set value

    Tried these two:

     

     

     Filter(People, Gender = [@Gender].Male)

     

    Error: Invalid use of '.'

     

     

     Filter(People, Gender = [@Gender (People)].Male)

     

    Error: Incompatible types for comparison. These types can't be compared: Table, OptionSetValue (Gender (People)).

     

    EDIT UPDATE: I just wanted to mention that my Dataverse column for "Gender" is set up as 'Choices' instead of 'Choice'.

  • OdinDelToro Profile Picture
    407 on at
    Re: Filter Dataverse table for an option set value

    Hello @minyi,

     

     Try using Filter(People, Gender = [@Gender].Male)

     

    Hope this helps clarify the doubt, let me know in case you're still facing an issue within it.

    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.

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 791 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 410

#3
mmbr1606 Profile Picture

mmbr1606 275 Super User 2025 Season 1