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 a table ...
Power Apps
Answered

How to filter a table based on a choice column in DataVerse?

(0) ShareShare
ReportReport
Posted on by 144

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"

 

cnr_0-1632132022983.png

 

Many thanks

Conor

 

Categories:
I have the same question (0)
  • Ramole Profile Picture
    Super User 2024 Season 1 on at

    Hi @cnr 

     

    Add at end  .Value like this    'Trade Type'.Value ="Secondary"     I think its choice field 

     

  • cnr Profile Picture
    144 on at

    Hi @Ramole 

     

    Thanks for responding, yeah I tried that but it says "the name isn't valid, this identifier isn't recognized"

    cnr_0-1632134264600.png

     

    I checked my table just to make sure its a choice field, and it is. Does this make sense to you ?

    cnr_1-1632134355252.png

     

    Thanks

    Conor

  • Verified answer
    timl Profile Picture
    37,285 Super User 2026 Season 2 on at

    Hi @cnr 

    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)
  • v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    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)

    vqiaqimsft_0-1632275652186.png

     

  • cnr Profile Picture
    144 on at

    Hi @v-qiaqi-msft ,Yes managed to get there in the end, thanks for your response! 

     

    Conor

     

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 356 Most Valuable Professional

#2
11manish Profile Picture

11manish 225 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 211

Last 30 days Overall leaderboard