CRM On Demand - Reports and Dashboards (MOSC)

MOSC Banner

How to display most recent Activity type on report

edited Oct 11, 2012 11:59AM in CRM On Demand - Reports and Dashboards (MOSC) 6 commentsAnswered ✓
I have a combined report that shows the most recent time an account was contacted within the last 30 days and the activity type.  The last completed activity date displays correctly using the MAX funtion, but the type is not pulling the type that corresponds with the date. It is showing a type when applicable, but it is the first one in the list.  I want the report to show the type only  if it was completed within the last 30 days. 

Here is my formula:

CASE WHEN TIMESTAMPDIFF(SQL_TSI_DAY,MAX(CAST(Activity."Completed Date" AS DATE)),CURRENT_DATE)< 30 THEN Activity."Type" ELSE NULL END

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