8 Replies Latest reply on Aug 8, 2014 9:12 AM by Dan Cory

    Reg. Occured an error with CountD, CASE & IF Stmt

    Tejaswi Goda

      Hello All,

       

      Need small suggestion or give me some idea.

       

      • Their is a string column name "[ABCCOL]" where it contains 0(Zero) & some values(say 123ABC) values & "[DATECOLUMN]" in Database
      • We need CountD([ABCCOL]). I created in Calculated Field name CALC1. and Calculation is Correct..
      • Now I have to use this, in CASE statement along with IF condition,

      It is like :

      CASE [<<EXP>>]

           When 'VALUE1' then

                     If [DATECOLUMN]< Today() AND [DATECOLUMN]> DATETRUNC('year',Today()) then [CALC1] else 0 end

           When VALUE2' then

                     If [DATECOLUMN]< Today() AND[DATECOLUMN]> (Today()-30) then [CALC1] else 0 end

      END

       

      After creating this CASE statement, I am getting an Error like "CANNOT USE 'NULL' TYPE IN 'CASE' EXPRESSION".

       

      Any Explanation please, regarding this Error..

       

      Waiting for your Valuable Response.

       

      Thanks & Regards,

      Tejas.