Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

IF THEN IF in advanced query editor

Hi,

 

I'd like to create a column similiar to this Excel-column in Advanced Query Editor:

CP REAL =IF([@[CP Raw]]>30;IF(H6368<=20;30;CA6368);CA6368)

 

The conditional column only allows me to create if X Then Y Else Q statements. But i'd like to create a

IF THEN IF ELSE ELSE statement.

 

How do I do this in Advanced Query Editor? Please note that, for various reasons, I don't want to create this column after i've applied my data to my report.

  • Mariusz's avatar
    Mariusz
    7 years ago

    Hi Anonymous 

    Please see the below

     

    Regards,
    Mariusz

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

6 Replies

  • MattAllington's avatar
    MattAllington
    Icon for Community Champion rankCommunity Champion

    If something>x then do something else (if somethingdifferent then whatever else theend)

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi MattAllingtonMariusz 

       

      Thanks for your reply! Almost there. But what I want him to do is basically this:

       

      So skip the first THEN and go straight into the else "if" statement.

      • Mariusz's avatar
        Mariusz
        Icon for Community Champion rankCommunity Champion

        Hi Anonymous 

         

        Wouldn't the below give you a desired outcome?

         

         

        Regards,
        Mariusz

        If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • Mariusz's avatar
    Mariusz
    Icon for Community Champion rankCommunity Champion

    Hi Anonymous 

     

    Please see the below.

     

     

    Regards,
    Mariusz

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.