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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

add conditional column

How to add 'and' under 'add conditional column'? 

 

if 'target' is great than 2 and *****, then ***

CRM.PNG

1 ACCEPTED SOLUTION
GilbertQ
Super User
Super User

Hi @Anonymous

 

In order to do that you will need to add a Custom Column


The syntax is the following below and NOTE that it is case sensitive

 

if [Target] > 2 and [Other column] = "Closed" then "My Output Closed"
else if [Target] > 1 and [Other column] = "Open" then "My Output Open"
 else "Other Output"

 

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!







Power BI Blog

View solution in original post

5 REPLIES 5
GilbertQ
Super User
Super User

Hi @Anonymous

 

In order to do that you will need to add a Custom Column


The syntax is the following below and NOTE that it is case sensitive

 

if [Target] > 2 and [Other column] = "Closed" then "My Output Closed"
else if [Target] > 1 and [Other column] = "Open" then "My Output Open"
 else "Other Output"

 

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!







Power BI Blog

Anonymous
Not applicable

@GilbertQ thanks, but i don't really get it.  how do i add 'and' in the picture i attached?  see above. 

Hi there you would add this as a Custom Column in the Edit Queries in Power BI Query Editor




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!







Power BI Blog

Anonymous
Not applicable

@GilbertQ yes, i'm in edit queries/add column/conditional column.  but where to add 'and'

 

for example below, how should i say

if actualstart = 11/07/2017 and (or) ****, then output = 13/07/2017. 

 

 

CRM.PNG

Hi there, instead of using the Conditional Column use the Custom Column and then paste the code in there.

Currently with the Conditional Column it does not allow you to put in the "and"




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!







Power BI Blog

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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 Solution Authors