Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
9 years ago
Solved

add conditional column

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

 

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

  • 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"

     

     

5 Replies

  • 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"

     

     

    • Anonymous's avatar
      Anonymous
      Not applicable

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

      • GilbertQ's avatar
        GilbertQ
        Super User
        Hi there you would add this as a Custom Column in the Edit Queries in Power BI Query Editor