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'.
I went through this same scenario and solved it using "true" or "false".
And I managed to filter it.
Filter(People, Gender = true)
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.
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.
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.
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).
The formula for the Items property is Filter(People, 'Gender (People)' = [@'Gender (People)'].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.
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:
Please find out the logic name of your Choice column
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.
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'.
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.
WarrenBelz
791
Most Valuable Professional
MS.Ragavendar
410
mmbr1606
275
Super User 2025 Season 1