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 / Formula Column Data Ty...
Power Apps
Unanswered

Formula Column Data Type Choice - nested if

(0) ShareShare
ReportReport
Posted on by 2
I have a formula column of data type choice. If I write a simple condition everything works. For example:
 
If(Name = "Test",
    Unterlagenstatus.'liegt vor',
    Unterlagenstatus.'liegt vor'
)
 
As soon as I add a second condition I get an error message:
 
If(Name = "Test",
    Unterlagenstatus.'liegt vor',
    If(Name = "Test",
        Unterlagenstatus.'liegt vor',
        Unterlagenstatus.'liegt vor'
    )
)
 
Error: The operation cannot be performed on multiple Option Sets. Please use single Option Set as result type.
 
If I convert it as follows, the error doesn't occur.
 
If(Name = "Test",
    If(Name = "Test",
        Unterlagenstatus.'liegt vor',
        Unterlagenstatus.'liegt vor'
    ),
    Unterlagenstatus.'liegt vor'
)
 
Can someone explain to me what I'm doing wrong? Or is this a system error?
 
I have the same question (0)
  • Shashank Bhide Profile Picture
    946 Moderator on at
    have you tried using switch? your second if condition doesn't seem to fit in the way "If" works in powerapps which is just a sequece of condition1->result1, condition2->result2
     
     

    If( Condition1, ThenResult1 [, Condition2, ThenResult2, ... [ , DefaultResult ] ] )

     
  • TTPlayer Profile Picture
    2 on at
    Thank you for your reply. I managed to create my formula correctly in another way. 
    But I still don't understand the problem. Why doesn't the above example work?
     
    The following variant works. If I use choices instead of text, I get the error above. Why?
     
    If(Name = "Test",
        "A",
        If(Name1 = "Test",
            "B",
            "C"
        )
    )
  • AS-01110123-0 Profile Picture
    2 on at
    I just ran into the same issue, and changing to the format of "if" suggested by Shashank Bhide worked for me with a Choice.
     
    I think the issue with the nested "if"s is that the return value of the inner if is a Yes/No - so the return value is then a mix of your Choice and Yes/No, rather than always your Choice.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 542 Most Valuable Professional

#2
Haque Profile Picture

Haque 206

#3
Kalathiya Profile Picture

Kalathiya 201 Super User 2026 Season 1

Last 30 days Overall leaderboard