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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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