Answers.Body: <p>This error is part of <code>CRM_Member_BAO_Membership</code>.  It's triggered when there's no membership status that fits the dates in question, and so this error depends on the day you do an import!</p>
  
  <p>For instance, if your memberships statuses are:
  Start Date to End Date = Current
  End Date to (End Date + 1 month) = Grace
  (End Date + 1 Month) to Any = Expired</p>
  
  <p>What happens if you import a membership with a start date of 10/25/2015 on 9/22/2015?  It's before the Start Date, so none of the statuses match.  This causes this error.</p>
  
  <p>If you're getting this error and this is definitely not the case, replicate the problem on the demo server, you may have found a bug.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-09-13T03:04:16.757Z
Answers.Text: Jon, thanks. The Start Date for all the memberships is 9/1/2015 and End Date is 10/1/2015. I'll try to replicate on demo.
Answers.UserDisplayName: Joe McLaughlin
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-09-12T23:12:14.903Z
Answers.LastActivityDate: 2015-09-12T23:12:14.903Z
Answers.UserDisplayName: Jon G - Megaphone Tech
Answers.Body: <p>[Bangs head on desk]. Aargh. So, upon further scrutiny, in fact the Start Date for the memberships I was attempting to import was 9/1/2025. Once I corrected the import file with a Start Date of 9/1/2015, then the import worked fine. Thanks Jon for the explanation above which made me go back and take a look at my import file.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-09-13T03:55:15.060Z
Answers.LastActivityDate: 2015-09-13T03:55:15.060Z
Answers.UserDisplayName: Joe McLaughlin
Body: <p>I am attempting to import and <em>update</em> existing memberships into 4.6.8, using the same steps that have worked successfully previously, but I'm getting an error.</p>
  
  <ul>
  <li><p>I have created a .csv file with (existing) Membership ID, (new) Start Date, (new) End Date, and Membership Type. For Membership Type I had used the text Monthly Sustaining Membership successfully in the past. I switched to import Membership Type ID of 2 after my first import error. I believe Membership Type ID (not the text value) is now required.</p></li>
  <li><p>On attempted import, I get the error "CiviCRM has detected invalid data and/or formatting errors in 40 records. These records have not been imported.
  You can Download Errors. You may then correct them, and import the new file with the corrected data."</p></li>
  <li><p>I download  the errors. The reason for the error for each record is "The membership cannot be saved because the status cannot be calculated." 
  I have not received this error with previous successful imports. </p></li>
  <li><p>The Start date for the updated membership is the same as the End date for the previous monthly membership, not a problem with past imports.</p></li>
  </ul>
  
  <p>I don't want to simply import these as new memberships, I want to update the existing memberships. </p>
  
  <p>Any help appreciated. Thanks so much. </p>
  
Tags: <civimember><import>
Title: When importing memberships into 4.6.8, what does ""The membership cannot be saved because the status cannot be calculated" mean?
ThreadText: # When importing memberships into 4.6.8, what does ""The membership cannot be saved because the status cannot be calculated" mean?
  
  (Asked by: username_0 on 2015-09-12)
  
  I am attempting to import and *update* existing memberships into 4.6.8, using the same steps that have worked successfully previously, but I'm getting an error.
  
  * I have created a .csv file with (existing) Membership ID, (new) Start Date, (new) End Date, and Membership Type. For Membership Type I had used the text Monthly Sustaining Membership successfully in the past. I switched to import Membership Type ID of 2 after my first import error. I believe Membership Type ID (not the text value) is now required.
  * On attempted import, I get the error "CiviCRM has detected invalid data and/or formatting errors in 40 records. These records have not been imported.
    You can Download Errors. You may then correct them, and import the new file with the corrected data."
  * I download the errors. The reason for the error for each record is "The membership cannot be saved because the status cannot be calculated."
    I have not received this error with previous successful imports.
  * The Start date for the updated membership is the same as the End date for the previous monthly membership, not a problem with past imports.
  
  I don't want to simply import these as new memberships, I want to update the existing memberships.
  
  Any help appreciated. Thanks so much.
  
  **Tags:** civimember, import
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2015-09-12. Score: 5
  
  This error is part of `CRM_Member_BAO_Membership`. It's triggered when there's no membership status that fits the dates in question, and so this error depends on the day you do an import!
  
  For instance, if your memberships statuses are:
  Start Date to End Date = Current
  End Date to (End Date + 1 month) = Grace
  (End Date + 1 Month) to Any = Expired
  
  What happens if you import a membership with a start date of 10/25/2015 on 9/22/2015? It's before the Start Date, so none of the statuses match. This causes this error.
  
  If you're getting this error and this is definitely not the case, replicate the problem on the demo server, you may have found a bug.
  
  > **Comments:**
  > **username_0**: Jon, thanks. The Start Date for all the memberships is 9/1/2015 and End Date is 10/1/2015. I'll try to replicate on demo.  
  
  ---
  
  ### Answer by username_0 on 2015-09-13. Score: 4
  
  [Bangs head on desk]. Aargh. So, upon further scrutiny, in fact the Start Date for the memberships I was attempting to import was 9/1/2025. Once I corrected the import file with a Start Date of 9/1/2015, then the import worked fine. Thanks Jon for the explanation above which made me go back and take a look at my import file.
  
  
  ---
  
  