Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
Anonymous
Not applicable

How to write if then formula with multiple if conditions

Hi,

I am trying to write a DAX statement (my very first one) that does something like this - (just an example for ease of understanding)

If First Name is Kathy, Nickname is Kat

If First Name is Katherine, Nickname is Kat

If FIrst Name is Katrina, Nickname is Kat

Otherwise Nickname is Joe

I know how to do this:

Nickname = if('Users'[First Name]="Kathy", "Kat", "Joe")

However, I don't know how to get the additional name options in there that would also equal Kat.

Any help would be profoundly appreciated.

2 ACCEPTED SOLUTIONS

@Anonymous You can try with Switch case:

COLUMN = SWITCH(TRUE(),

                     Table[NameColumn]="Kathy","Kat",
                     Table[NameColumn]="Theresa","Kat",

                     Table[NameColumn]="Fred","Kat",

                     "Joe"

                    )

 


  

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Please take a quick glance at newly created dashboards : Restaurant Management Dashboard , HR Analytics Report , Hotel Management Report, Sales Analysis Report , Fortune 500 Companies Analysis , Revenue Tracking Dashboard

View solution in original post

Anonymous
Not applicable

Yes! Thank you. I believe this is what I needed. 😀

View solution in original post

6 REPLIES 6
Anonymous
Not applicable

Thank you for the hand-holding through my first question. I have fixed this.

Tahreem24
Super User
Super User

@Anonymous TRy this DAX:

COLUMN = If((LEFT(Name)=3)="Kat","Kat","Joe")

 

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Please take a quick glance at newly created dashboards : Restaurant Management Dashboard , HR Analytics Report , Hotel Management Report, Sales Analysis Report , Fortune 500 Companies Analysis , Revenue Tracking Dashboard
Anonymous
Not applicable

Hi Tahreem24, thank you for taking the time to answer. I really appreciate it. I was using that scenario as an example and I see I have mistakenly expressed my issue incorrectly because of the example I used. The point I meant to make was that I have three different if statements, that don't necessarily start with the same 3 letters. I meant to simplify the example, but only complicated it. My question is more like this:

If First Name is Kathy, Nickname is Kat

If First Name is Theresa, Nickname is Kat

If First Name is Fred, Nickname is Kat

Otherwise Nickname is Joe.

 

Otherwise Nickname is Joe

 

@Anonymous You can try with Switch case:

COLUMN = SWITCH(TRUE(),

                     Table[NameColumn]="Kathy","Kat",
                     Table[NameColumn]="Theresa","Kat",

                     Table[NameColumn]="Fred","Kat",

                     "Joe"

                    )

 


  

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Please take a quick glance at newly created dashboards : Restaurant Management Dashboard , HR Analytics Report , Hotel Management Report, Sales Analysis Report , Fortune 500 Companies Analysis , Revenue Tracking Dashboard
Anonymous
Not applicable

Yes! Thank you. I believe this is what I needed. 😀

@Anonymous I am glad that your issue has been solved. But you mistakenly marked your reply as a solution. Kindly properly mark right reply as a solution which will help others also.

 

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Please take a quick glance at newly created dashboards : Restaurant Management Dashboard , HR Analytics Report , Hotel Management Report, Sales Analysis Report , Fortune 500 Companies Analysis , Revenue Tracking Dashboard

Helpful resources

Announcements
October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Kudoed Authors