title: How to find DateDiff from same column with condition in Power BI
body: <p>I am having one table in PowerBI which is having 3 columns: 1.EnrollId 2.Status 3.StatusChangeDate. One EnrollId is having 4 statuses and their particular statusChangeDates. I want to find no. of days between two dates with status condition.</p>
  
  <pre><code>EnrollId   Status         StatusChangeDate
  101        AppStart       15/02/2019
  101        Application    27/03/2019
  101        Enrollment     03/04/2019
  101        Complete       28/04/2019
  </code></pre>
  
  <p>I want to create formula in DAX like </p>
  
  <pre><code>[StatusChangeDate (where Status="Enrollment") - StatusChangeDate(where status="AppStart)]
  </code></pre>
  
  <p>or</p>
  
  <pre><code>[StatusChangeDate (where Status="Complete")- StatusChangeDate(where status="Enrollment)]
  </code></pre>
  
  <hr>
  
  <pre><code>i.e.  03/04/2019 - 15/02/2019 = 44 Days
        28/04/2019 - 03/04/2019 = 25 Days
  </code></pre>