Body: <p>I have a filtering issue I'm trying to deal with:</p>
  
  <p>I created a custom Drupal view so a client can do membership reports. The client requires the ability to do membership reports based on dates (range or specific).</p>
  
  <p>For example - she wants a report of everyone who has expired in the last 45 days. She puts in that date range. She gets her report.</p>
  
  <p>The problem is that it will include people who expired with that date range, but it will also include those who have renewed and are actual current members.</p>
  
  <p>I've tried using aggregation, but it doesn't seem to print these results using the CSV views module.</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-01-27T21:39:50.330Z
Comments.Text: Right. When they renew it creates a separate Membership record. Could you filter out those Membership records by specifying that the Start Date must be less than -45 days
Comments.UserDisplayName: petednz - fuzion
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-01-27T21:40:02.240Z
Comments.Text: If that works i will convert to an answer
Comments.UserDisplayName: petednz - fuzion
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-01-27T21:42:52.240Z
Comments.Text: Damn, Pete. Should have thought of that - so obvious. Giving it a try now. Will respond back if this works.
Comments.UserDisplayName: Alex Katayama
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-01-27T22:04:58.747Z
Comments.Text: This is close - Current/Expired duplicates are filtered out. Unfortunately, it filters out the Current membership information, and leaves the Expired membership information so now they won't know if that person's current membership is expired or not (is that too convoluted). Thanks for pointing me in the right direction. Essentially, whatever the most current membership is so be displayed.
Comments.UserDisplayName: Alex Katayama
Tags: <civimember><drupal-views>
Title: Membership report with Drupal Views - how to remove duplicate records if they expired AND renewed between a time frame?
ThreadText: # Membership report with Drupal Views - how to remove duplicate records if they expired AND renewed between a time frame?
  
  (Asked by: username_0 on 2016-01-27)
  
  I have a filtering issue I'm trying to deal with:
  
  I created a custom Drupal view so a client can do membership reports. The client requires the ability to do membership reports based on dates (range or specific).
  
  For example - she wants a report of everyone who has expired in the last 45 days. She puts in that date range. She gets her report.
  
  The problem is that it will include people who expired with that date range, but it will also include those who have renewed and are actual current members.
  
  I've tried using aggregation, but it doesn't seem to print these results using the CSV views module.
  
  **Tags:** civimember, drupal-views
  
  > **Comments:**
  > **username_1**: Right. When they renew it creates a separate Membership record. Could you filter out those Membership records by specifying that the Start Date must be less than -45 days  
  > **username_1**: If that works i will convert to an answer  
  > **username_0**: Damn, Pete. Should have thought of that - so obvious. Giving it a try now. Will respond back if this works.  
  > **username_0**: This is close - Current/Expired duplicates are filtered out. Unfortunately, it filters out the Current membership information, and leaves the Expired membership information so now they won't know if that person's current membership is expired or not (is that too convoluted). Thanks for pointing me in the right direction. Essentially, whatever the most current membership is so be displayed.  
  
  ---
  
  ## 0 answers
  
  