Solved

Filter out NULL values not working in OBIEE column formula

Posted on 2015-02-02
1
1,120 Views
Last Modified: 2015-02-03
I have a column formula that I've almost, but not quite, gotten to work. The problem is that "Program Start Date" field is a VARCHAR in the format 201209 and is sometimes NULL, so the formula doesn't work when this field is NULL. I am able to filter out NULL values by creating an analysis, and when I do this the formula does work. But when I try to do the same thing by adding a condition to the column formula, it doesn't work.

SUM(CASE WHEN

"Enrolment - College"."F College Enrolment"."Program Start Date" is not NULL and

(TimeStampDiff(SQL_TSI_month, TO_DATETIME("Enrolment - College"."F College Enrolment"."Program Start Date" || '01', 'yyyy/mm/dd') , TO_DATETIME(LEFT("Enrolment - College"."D Time"."Fiscal Year", 4)||'/09/01', 'yyyy/mm/dd'))) / 12 >= 5

THEN 1 ELSE 0 END)
0
Comment
Question by:mariita
1 Comment
 
LVL 4

Accepted Solution

by:
scsyme earned 500 total points
ID: 40584994
You can't short circuit a null in SQL like you would in Java, C#, etc. You could try one of two alternative approaches:
1) make the first case statement handle the instances where the date is null
2) wrap all references to the date field in a NVL function (Oracle's version if ISNULL)
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I recently went through setting up a JasperReports Server using the AWS EC2 instance, and this article will cover some basic administration tasks I had to perform.
Occasionally there is a need to clean table columns, especially if you have inherited legacy data. There are obviously many ways to accomplish that, including elaborate UPDATE queries with anywhere from one to numerous REPLACE functions (even within…
This video shows setup options and the basic steps and syntax for duplicating (cloning) a database from one instance to another. Examples are given for duplicating to the same machine and to different machines
This video shows how to recover a database from a user managed backup

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now