I've recently run into some peculiar behaviour in OBIEE (Oracle Business Intelligence 18.104.22.168.0). I'm using three attribute colums (deliv. on time, ordered, backlog) to calculate a monthly service level. In addition I'm using a customer ID number to separate our customers into export and national customers. I've three calculated columns - Service Level Export, Service Level Total and Service Level National. I'm using a simple case-statement to distinguish between international and national customers (When custID between xxx and yyy then...). The total service level column doesn't have a case-if calculation, only a couple of simple mathematical operations and it works fine.
Now the problem is that the results show up only in one of those calculated columns containing case-if calculations - not both at the same time. Using a prompt in a pivot table I can verify that both columns get proper values but when I remove the prompt half of the values randomly disappear from these columns so that only one of the columns has a value for a specific month. The calculations in all three columns are identical - the only difference is that Serv. L. Exp. exludes a spesific CustID whereas the Serv. L. Nat. only includes that one CustID.
Example - both Serv. L. Exp and Serv. L. Nat should have values for every month, now only one of them gets values
Month Serv. L. Exp. Serv. L. Nat. Total Serv. L.
01 15 % 15 %
02 17 % 17 %
03 13 % 13 %
04 20 % 20 %
05 22 % 22 %
I've a few months of OBIEE experience under my belt so I'm not that experienced but usually I've been able to figure out what's wrong on my own. This time, however, this leaves me dumbfounded. Any help or advice would be much appreciated.
Serv.L.Nat is calculated 100 * INVOICED / (ORDERED + DELAYED). For National Service Level the case statement (including the calculations) is as follows (the inner CASE limits the Serv.L.Nat per cust to a range of 0 - 100 %):
CASE WHEN "fact"."CustID" = 100001 THEN (
CASE WHEN Serv.L.Nat > 100 THEN 100
WHEN Serv.L.Nat < 0 THEN 0
WHEN Serv.L.Nat IS NULL THEN 0
For Export the sql is exactly like the one above, barring the reversed condition.
PS. The above is a burst of pseudoSQL so don't mind the typos, the actual code is tested to work as intended... barring the fact that something's wrong with getting the values to appear.