This discussion is archived
1 Reply Latest reply: Aug 20, 2012 2:41 AM by dpl007 RSS

Show all companies with no activity in 12 months

807103 Newbie
Currently Being Moderated
So I want to pull up a report of all companies with no logged activities in the last 12 months.

I am using the following code to give me a list of days since last logged activity: TIMESTAMPDIFF(SQL_TSI_DAY, MAX("- Created Date".Date), CURRENT_DATE)

I am then filtering by asking for for results greater than 364 days.

This is great, but if a company has an activity last week, 2 months ago, and 3 years ago, it still shows on the report with the activity 3 years ago. What is the proper way to do this logic?
  • 1. Re: Show all companies with no activity in 12 months
    dpl007 Newbie
    Currently Being Moderated
    please try following filter for "Created Date".Date: "is between TIMESTAMPADD(SQL_TSI_DAY, -365, NOW()) and NOW()". Use SQL Expression for both functions insted of Value.
    In order to find out the number of Activity records you can use Activity Metrics. There is field "# of Activity", you can filter on this field with "is not equal 0".


  • Correct Answers - 10 points
  • Helpful Answers - 5 points