1 Reply Latest reply on Jul 24, 2018 5:36 AM by Zhouyi Zhang

    Question about using Funnels and IF statements

    Zin Ko Hlaing

      Hello,

       

      I am trying to recreate the funnel report from this tutorial: Funnel Charts  and I have some questions.

       

      I have a lead funnel which will look something like below.

      Total Leads: xxx

      New Leads: xxx

      Converted Leads: xxx

       

      I created a calculated field to calculate this funnel because in my database, there is no lead phase like the one mentioned in tutorial. "status" here refers to lead status in my database.

      IF NOT ISNULL([status]) THEN 'Total Leads'
      ELSEIF status = 'New' THEN 'New'
      ELSEIF status = 'Working' THEN 'Working'
      ELSEIF status = 'Converted' THEN 'Converted' ELSE 'Rejected' END
      

       

      Now my problem is when I create the funnel, all of my leads are being identified as 'Total Leads' rather than their lead status. I know this is a nested if problem but I cannot figure out how to calculate this one.

       

      Many thanks in advance.

        • 1. Re: Question about using Funnels and IF statements
          Zhouyi Zhang

          Hi, Zin

           

          Try below :

           

          IF status = 'New' THEN 'New' 

          ELSEIF status = 'Working' THEN 'Working' 

          ELSEIF status = 'Converted' THEN 'Converted' ELSE 'Rejected'

          ELSEIF NOT ISNULL([status]) THEN 'Total Leads' 

          END 

           

          Basically you need use isnull in the end, because your logic for Total Leads is when [status] is not null, so if you put it in the first condition, e.g. if status = 'New' also meets is not null condition.

           

          Hope this helps

           

          ZZ