Skip to main content

Notifications

Community site session details

Community site session details

Session Id : sjaVVSbx3ejHfRK5U84HZA
Power Apps - Microsoft Dataverse
Answered

If then PowerFx formula column based on choice column

Like (0) ShareShare
ReportReport
Posted on 15 Jan 2024 12:54:14 by 10

I have a choice column in my Dataverse with following choices: "Active", "Inactiv", "Delete", and also with blank values. I want to create a formula column, which displays "No Status" for the blank values, otherwise it takes the values from the choice column. 

This new formula column should optimally be a choice column as well.

I tried this formula, but it didn´t work out:

 

If( IsBlank([crd6c_status]), "Kein Status", [crd6c_status] )

 

I´m grateful for any inputs. 

Categories:
  • Dorottya Profile Picture
    10 on 16 Jan 2024 at 10:37:49
    Re: If then PowerFx formula column based on choice column

    Thank you! That´s exactly what I wanted! 

    Unfortunately the "No status" as default value method didn´t work out for me, since my choice column gets the data automatecally imported, and the blank values are not considered as no value, and because of that those won´t get the label "No status". 

    Anyways thank you for the solution!

  • Verified answer
    Drew Poggemann Profile Picture
    9,278 Most Valuable Professional on 15 Jan 2024 at 15:24:10
    Re: If then PowerFx formula column based on choice column

    Hi @Dorottya,

     

    I think you need to be able to display as the text value for the output in this case.  I did the following and it worked but had to evaluate all choices...  I had a Breed which had 4 options...

     

    Switch(Breed, Blank(),"No Breed", 'Breed (Cats)'.Siamese,"Siamese",'Breed (Cats)'.Bengal,"Bengal",'Breed (Cats)'.Sphinx, "Sphinx",'Breed (Cats)'.Tabby,"Tabby") 
    

     

    Note, you could also create a "No Status" option in your Choice field and default the value to this to save having to create a new field...  This way it is a valid option in the choice list and defaulted if none selected...

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,743 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,089 Most Valuable Professional

Leaderboard

Featured topics

Loading started