Announcements
How do I filter a choice column?
My 'Trade Type' Column has 2 options "Primary" or "Secondary"
The error I get is "Incompatible types for comparison. These types can't be compared: OptionSetValue(Type),Text"
Many thanks
Conor
Hi @cnr
Add at end .Value like this 'Trade Type'.Value ="Secondary" I think its choice field
Hi @Ramole
Thanks for responding, yeah I tried that but it says "the name isn't valid, this identifier isn't recognized"
I checked my table just to make sure its a choice field, and it is. Does this make sense to you ?
Thanks
You should be able to access a 'Trade Type' enumeration, as demonstrated in this example.
https://powerusers.microsoft.com/t5/Building-Power-Apps/CDS-choice-field-in-Power-Apps/m-p/834646
That specific part of your formula would look like this:
Filter('Trade Tables', 'Trade Type'='Trade Type'.Secondary)
Hi @cnr,
Have you solved your problem?
Do you want to filter based on a Choice field in Dataverse?
Actually, you should refer to a Choice field as below:
[@ChoiceFieldName].Option1
On your side, please modify your formula as below:
Filter('Trade Tables', 'Trade Type'=[@'Trade Type'].Secondary)
Hi @v-qiaqi-msft ,Yes managed to get there in the end, thanks for your response!
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.
Congratulations to our community stars!
Expanding mentorship, skilling, and AI innovation
These are the community rock stars!
Stay up to date on forum activity by subscribing.
WarrenBelz 416 Most Valuable Professional
11manish 205 Super User 2026 Season 2
MS.Ragavendar 128 Super User 2026 Season 2