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 / 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
    942 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

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

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard