CRM On Demand - Reports and Dashboards (MOSC)

MOSC Banner

CASE IF usage in a report

edited Jun 20, 2011 8:40PM in CRM On Demand - Reports and Dashboards (MOSC) 2 commentsAnswered ✓
I am trying to use the CASE IF/WHEN function to identify opportunities that are either "Near Term" within 90 days from today's date; or "Long Term" greater than 90 days from today's date. Here is the formula I have used in the Expected Order Date field. (I have tried this in both the "close date" field, what we call "Expected Order Date" and in the "date.date" field but each time the result defaults to "Near Term" even though the date difference is >90 days.

CASE
WHEN TIMESTAMPDIFF(SQL_TSI_DAY, Opportunity."Close Date",  CURRENT_DATE)<=90 THEN 'Near Term'
WHEN TIMESTAMPDIFF(SQL_TSI_DAY, Opportunity."Close Date", CURRENT_DATE)>=91 THEN 'Long Term'

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center