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 / Comparing OptionSetVal...
Power Apps
Answered

Comparing OptionSetValue to Text

(1) ShareShare
ReportReport
Posted on by Microsoft Employee

Hello,

 

I am currently getting an error that reads:

"Incompatible types for comparison. The left value is a OptionSetValue(secctor_options_keys) and the right is a Text"

 

So my the OptionSetValue(secctor_options_keys), comes from my table. The table has a column called Sect, where it is a choice field from sectoor_options_keys. (choice NOT choices). 

 

I want to compare this to a text value selected from a Dropdown called SectorDD, which has all of the options hard coded in. Like ["A","B","C"....].

 

I am trying to filter by using the following code:

Filter('K.E.Y.S', Sect = SectorDD.Selected.Value)

 

However I am getting the errror message from the beginning of this post under the equals sign.

 

I was wondering how I would be able to compare there two different OptionSetValue and Text.

 

Categories:
I have the same question (0)
  • Verified answer
    v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    Hi @Anonymous,

    Could you please modify your formula as below:

    Filter('K.E.Y.S', Text(Sect) = SectorDD.Selected.Value)

    This will lead to the delegation warning, if your data set is not very huge, please ignore this warning.

    Regards,

    Qi

  • BenDonahue Profile Picture
    932 on at

    One way to get around this delegations issue is to add a column and populate that with the text value of Sect:

    ClearCollect(colKEYS, Filter(AddColumns('K.E.Y.S.', "_textSect", Text(Sect), _textSect = SectorDD.Selected.Value));

     

    "I do it for the Kudos, :)"

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 358 Most Valuable Professional

#2
11manish Profile Picture

11manish 207 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 150 Super User 2026 Season 2

Last 30 days Overall leaderboard