Answers.Body: <p>You've basically got it. You want Contacts without Contact Activities if Activity Date &lt; 18 months ago and Contact Role = Activity Target and with (required) Contact Activities if Contact Role = Activity Target. This gives you contacts who had at least one activity more than 18 months ago, but haven't had one in the last 18 months.</p>
  <p>You can also, if this is something you do regularly and don't want to update the dates for each time, add an option to the relative date filter option group for the 'Last 18 months' (it should be <code>ending_18.month</code>, but test to confirm it works). Then you can use that as your date range for the without (Activity Date = Date Range Last 18 months) and for the with you can use Activity Date is between nothing and Last 18 months, which will find all activities up to 18 months ago.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-06-22T06:52:14.760Z
Answers.Text: To confirm.
  
  People we had an activity with at some point in the past.
  
  But who have not had an activity in the last 18 months.
  
  Wanted to see if I could use Searchkit to build it rather than rely on smart groups, and include/ exclude searches.
Answers.UserDisplayName: Craig Almond
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-06-22T20:06:43.383Z
Answers.Text: Edited answer above for this.
Answers.UserDisplayName: Lars SG
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-07-25T15:06:46.080Z
Answers.Text: Maybe post another question with the specific search you are doing as I'm not quite sure I follow.
Answers.UserDisplayName: Lars SG
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-06-21T16:33:19.720Z
Answers.LastActivityDate: 2023-06-22T20:14:26.530Z
Answers.LastEditDate: 2023-06-22T20:14:26.530Z
Answers.UserDisplayName: Lars SG
Body: <p>I'm trying to use search kit to find contacts who have had no contact with our organisation in the last 18 months.</p>
  <p>Building this as a contact search, and then searching on contact activities</p>
  <p>So date of last activity was more than 18 months ago.</p>
  <p>What's the best way to build the query?</p>
  <hr />
  <p>edit</p>
  <hr />
  <p>Think I've figured it, I've searched for 2 contact activities</p>
  <p><a href="https://i.sstatic.net/BF0gq.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/BF0gq.png" alt="enter image description here" /></a></p>
  
Tags: <searchkit>
Title: Finding contacts with no activities in the last 18 months- using searchkit
ThreadText: # Finding contacts with no activities in the last 18 months- using searchkit
  
  (Asked by: username_0 on 2023-06-21)
  
  I'm trying to use search kit to find contacts who have had no contact with our organisation in the last 18 months.
  
  Building this as a contact search, and then searching on contact activities
  
  So date of last activity was more than 18 months ago.
  
  What's the best way to build the query?
  
  ---
  
  edit
  
  ---
  
  Think I've figured it, I've searched for 2 contact activities
  
  [![enter image description here](https://i.sstatic.net/BF0gq.png)](https://i.sstatic.net/BF0gq.png)
  
  **Tags:** searchkit
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2023-06-21. Score: 2 | Accepted answer
  
  You've basically got it. You want Contacts without Contact Activities if Activity Date < 18 months ago and Contact Role = Activity Target and with (required) Contact Activities if Contact Role = Activity Target. This gives you contacts who had at least one activity more than 18 months ago, but haven't had one in the last 18 months.
  
  You can also, if this is something you do regularly and don't want to update the dates for each time, add an option to the relative date filter option group for the 'Last 18 months' (it should be `ending_18.month`, but test to confirm it works). Then you can use that as your date range for the without (Activity Date = Date Range Last 18 months) and for the with you can use Activity Date is between nothing and Last 18 months, which will find all activities up to 18 months ago.
  
  > **Comments:**
  > **username_0**: To confirm.  People we had an activity with at some point in the past.  But who have not had an activity in the last 18 months.  Wanted to see if I could use Searchkit to build it rather than rely on smart groups, and include/ exclude searches.  
  > **username_1**: Edited answer above for this.  
  > **username_1**: Maybe post another question with the specific search you are doing as I'm not quite sure I follow.  
  
  ---
  
  