3 Replies Latest reply: Dec 29, 2012 1:38 PM by kart RSS

    OBIEE 11G Count problem

    user12301120
      Hi Gurus,

      I want to convert to below condition to obiee.

      Database Condition like below:

      ZEROIFNULL(CAST((CAST(COUNT(CASE WHEN END_output<=.033 and END_output>='-.117' THEN END_output END) AS FLOAT)/
      CAST(NULLIFZERO (COUNT(In_PUT)) AS FLOAT)) AS DECIMAL(10,1)))*100 AS Real_Time

      In Database output is = 48

      I have converted to OBIEE like below.

      IFNULL( CAST ( COUNT(CASE WHEN "- Order Fact"."END_output" <= .033 and "- Order Fact"."END_output" >='-.117' THEN "- Order Fact"."END_output" END) AS FLOAT ), 0) / CAST(IFNULL (COUNT("- Sales Fact"."In_PUT"),0) AS FLOAT ) *100.0

      In OBIEE output is = 45

      Note: I am getting two or three count difference in OBIEE.
      I guess the problems is Decimal, how to apply decimal in obiee like (DECIMAL(10,1)))..
      Please help on this.

      Note: I have tired several methods like below but no luck still am facing problem.

      (COUNT(CASE WHEN (END_output*1.00)<=.033 and (END_output*1.00)>='-.117' THEN (END_output*1.00) END)/
      COUNT(In_PUT))*100.0

      Please help me on this ...
      Thanks