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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
guyinazo
Helper I
Helper I

If...else run block of statements

I am adding a new column to a table that uses an IF statement.  What would the syntax be if I need to run more than one statement if the condition is true?  So..,

 

If a=1, run this statement, then run this statement and even this third statement, else run this

 

Thanks

1 ACCEPTED SOLUTION
TheoC
Super User
Super User

Hi @guyinazo 

 

Yes, certainly can.  All you need to do is replace the FALSE statement with another IF and continue as such.  For example:

 

Measure or Column = IF ( 'table'[column] = 1 , "ABC" , IF ( 'table'[column] = 2 , "DEF" , IF ( 'table'[column] = 3 , "GHI"....)

 

Hope this helps 🙂

 

If I have posted a response that resolves your question, please accept it as a solution to formally close the post.

Also, if you are as passionate about Power BI, DAX and data as I am, please feel free to reach out if you have any questions, queries, or if you simply want to connect and talk to another data geek!

Want to connect?www.linkedin.com/in/theoconias

View solution in original post

1 REPLY 1
TheoC
Super User
Super User

Hi @guyinazo 

 

Yes, certainly can.  All you need to do is replace the FALSE statement with another IF and continue as such.  For example:

 

Measure or Column = IF ( 'table'[column] = 1 , "ABC" , IF ( 'table'[column] = 2 , "DEF" , IF ( 'table'[column] = 3 , "GHI"....)

 

Hope this helps 🙂

 

If I have posted a response that resolves your question, please accept it as a solution to formally close the post.

Also, if you are as passionate about Power BI, DAX and data as I am, please feel free to reach out if you have any questions, queries, or if you simply want to connect and talk to another data geek!

Want to connect?www.linkedin.com/in/theoconias

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.