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 / Incompatible types for...
Power Apps
Answered

Incompatible types for comparison - OptionSetValue & Boolean

(0) ShareShare
ReportReport
Posted on by 523

I am attempting to filter a Canvas app gallery with the following code:

Filter(
 Projects_1,
 'Opportunity Status'.'Projects Home Default Display' = true
)

But it fails to run. It shows the error as an incompatible type for comparison (OptionSetValue, Boolean).

When I created the 'Opportunity Status' Table, I created the 'Projects Home Default Display' column as a yes/no data type (thinking this would be Boolean).

1) do I need to re-create the table with boolean values (if so, which data type serves as this?)

2) is there a formula which would account for the different data types?

thanks!

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

    Hi @Medoomi,

    Modify your formula as below:

     

    Filter(
     Projects_1,
     'Opportunity Status' = 'Projects Home Default Display' .Yes
    )

    Here is my testing scenario, OnDuty is a OptionSet column with yes/no data type, you could find that 'OptionSetName(TableName)'.Yes is the correct format.

    On your side, you could also try:

    Filter(
     Projects_1,
     'Opportunity Status' = 'OptionSetName(TableName)'.Yes
    )​

    vqiaqimsft_0-1670223489298.png

     

     

  • Medoomi Profile Picture
    523 on at

    Thank you so much @v-qiaqi-msft 

     

    Sadly I may not have described the situation adequately. 'Opportunity Status' is a lookup column within Projects_1. It looks up the Table 'Opportunity Status', and the column (within the 'Opportunity Status' table) that I need to perform the comparison on is 'Projects Home Default Display'.

    'Projects Home Default Display' is set to a data type of yes/no within Dataverse.

    Filter(
     Projects_1,
     'Opportunity Status'.'Projects Home Default Display' = true
    )

    seems to be the right format, but the data types don't match. Is there a way to change the syntax to accommodate the Boolean value on the right side of the = sign?

  • v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    Hi @Medoomi

    You mean that the you want to filter the child table Projects_1 based on the yes option set from  'Projects Home Default Display' column  in parent table 'Opportunity Status', right?

     

    We could compare the option set value with the OptionSetColumn in the same table, but we could not achieve this by comparing no-LookUp column acrossing the tables.

  • Medoomi Profile Picture
    523 on at

    Thanks again @v-qiaqi-msft 

     

    Could you help me understand what is going on a bit better? When I had the 'Projects Home Default Display' column set to data type text, the following formula would work:

    Filter(
     Projects_1,
     'Opportunity Status'.'Projects Home Default Display' = "true"
    )

    (both being text comparisons).

    Now that I changed the data type to yes/no, does an option set column simply introduce an extra level of relationship expansion... Or why won't a comparison work in a filter like this?

    Thanks!

  • bugescape Profile Picture
    41 on at

    I have this issue as well, I dont understand why Microsoft just want to **bleep** you over with such a small minor issue

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

#2
11manish Profile Picture

11manish 207 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 177

Last 30 days Overall leaderboard