web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Create a FX boolean co...
Power Apps
Unanswered

Create a FX boolean column from a Choice column having multiple values

(0) ShareShare
ReportReport
Posted on by 1

Can someone give me a hint how to create a FX formula to have a boolean result

 

I have a field with a choice type of ch_CompanyServiceKind when this kind has 3 kinds 

FullProductKind

AssembleKind 

ConsumerKind 

 

In the table definition i have a Field CompanyServiceKind with the choice type chCompanyServiceKind

I want to have a FX boolean field 

 

I have something like this

If( ch_CompanyServiceKind .ConsumerKind in CompanyServiceKind  , true, false)
 
But it's not working
I get 
This operation cannot be performed on type OptionSetValue (global_ch_CompanyServiceKind) in formula columns.
 
 
 

 

I have the same question (0)
  • ivan_apps Profile Picture
    2,187 Moderator on at

    I believe you need to change you "IN" operator to an "=" operator and compare the column to the available options of the column. No need to reference the global optionset directly.  Yes/No columns should also be defined by the [Column Name].[Yes/No]

     

    example:

    If( ThisItem.CompanyServiceKind = CompanyServiceKind.ConsumerKind , [YourYesNoField].Yes , [YourYesNoField].Yes)

     

    Note that you can set formula columns to Yes/No fields, but you won't be able to set them to Choice fields

     

    https://learn.microsoft.com/en-us/power-apps/maker/data-platform/formula-columns?tabs=type-or-paste#data-types

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 793 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 333 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard