3 Replies Latest reply on Nov 13, 2015 5:35 AM by Ibag

Cannot use perform divison calculation in OBIEE 11g

Hello. I am trying to divide to sets of numbers but the result is always 0.00. I switched the operator to multiply (*) and it shows results. I do not understand why divide '/' does not work. See what I am doing below. Note: The numbers are NOT from a column in the database. I am manually keying the numbers with a CASE statement.

(CASE "PayM"."DEPT" --> this represents the first total

WHEN '01' THEN 1150

WHEN '02' THEN 145

WHEN '03' THEN 42

WHEN '04' THEN 844

END)

/  --> I want to divide the first total by the SUM of the first and second total

SUM(

(CASE "PayM"."DEPT" --> this represents the first total again

WHEN '01' THEN 1150

WHEN '02' THEN 145

WHEN '03' THEN 42

WHEN '04' THEN 844

END)

+ --> I am adding the second total to the first total

(CASE "PayM"."DEPT" --> this represents the second total

WHEN '01' THEN 1875

WHEN '02' THEN 255

WHEN '03' THEN 29

WHEN '04' THEN 1380

END))

So for department 01 I expect: 1875 /  (1875 + 1150) = .62

Le

• 1. Re: Cannot use perform divison calculation in OBIEE 11g

Can't you simply create three logical columns in the RPD and then create a derived column on top of those three?

• 2. Re: Cannot use perform divison calculation in OBIEE 11g

Thanks for the response but I am not able to update the RPD. I did get it to work. See below. BTW, my first post used the wrong numbers. S/b for department 01 I expect: 1150 /  (1150 + 1875) = .38

Here is how it worked.

CAST(CASE "PayM"."DEPT"

WHEN '01' THEN 1150

WHEN '02' THEN 145

WHEN '03' THEN 42

WHEN '04' THEN 844

END AS float)

/

(CAST(CASE "PayM"."DEPT"

WHEN '01' THEN 1150

WHEN '02' THEN 145

WHEN '03' THEN 42

WHEN '04' THEN 844

END AS float)

+CAST(CASE "PayM"."DEPT"

WHEN '01' THEN 1875

WHEN '02' THEN 255

WHEN '03' THEN 29

WHEN '04' THEN 1380

END AS float))

• 3. Re: Cannot use perform divison calculation in OBIEE 11g

Hi,

Put them in Individual columns in report and check results.

Regards,

Ibag