title: How to calculate difference in time from the same column grouped by another column?
body: <p>I have an excel power query (also added to powerpivot data table) with two fields: Location and OpenedTime. Location column has many duplicates such as this example:</p>
  
  <pre><code>Location     OpenedTime
  LOC_1        9/25/2016 1:48:56 AM
  LOC_2        9/30/2016 2:01:00 PM
  LOC_1        10/10/2016 12:08:00 PM
  LOC_3        9/17/2016 9:35:43 PM
  LOC_1        10/15/2016 11:14:21 AM
  LOC_2        10/16/2016 8:27:34 PM
  LOC_3        10/18/2016 11:52:27 AM
  LOC_2        10/22/2016 9:09:00 AM
  </code></pre>
  
  <p>What I am looking for is a way to calculate the difference in open time for the 3 locations. </p>
  
  <p>So a new column would display the difference between 10/10/2016 12:08:00 PM and 9/25/2016 1:48:56 AM for LOC_1. </p>
  
  <p>Since there are multiple timestamps to calculate differences of, I was thinking if it would be possible to average all differences into one average difference for each LOC</p>
  
  <p>Thank you!!</p>