Summary
How to override null value with values from another column in OBIEE Analysis
Content
When building an analysis in OBIEE, what would be the code to enter into the "Column Formula" box in "New Calculated Measure" if I want to create a new column where null values are override with existing values?
For example, in the enclosed screenshot I have the analysis shown on the left. My goal is to fill the Null values with the first/only NOT NULL values in "Raw Materials" column per each product i.e A, B and C in Product column. Result per dataset shown to the right.
The following 3 sets of code did not work:
CODE 1:
IFNULL(Raw Materials,
First_value(Raw Materials) OVER (PARTITION BY Product))
CODE 2:
IFNULL(Raw Materials,
First_value(Raw Materials) OVER (PARTITION BY Product RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW))
CODE 3:
COALESCE(lag(Raw Materials ignore null) over (partition by Product), Raw Materials)
Version
Oracle Business Intelligence 11.1.1.9.0
