title: MEDIAN calculates incorrectly when using "Extract Data" data source in Google Data Studio
body: <p>MEDIAN is calculated correctly when using Google Sheets data source, but does not when using the &quot;Extract Data&quot; data source.</p>
  <p>I have setup the following <a href="https://docs.google.com/spreadsheets/d/1KODuBwtxd1juMOingSMSqgNMcD9CFyH_S8OzcxZOFas/edit#gid=0" rel="nofollow noreferrer">Google Sheet</a> with a series of test data, Metric A and Metric B have 4 values.   Metric C has 5 values.</p>
  <p>I have setup a <a href="https://datastudio.google.com/datasources/1920499b-9c75-4102-ac54-6b25dcfe8ed1" rel="nofollow noreferrer">Google Sheets Data Source</a> to this sheet, and then setup a <a href="https://datastudio.google.com/datasources/cabd52ed-d29e-4671-bc76-1ebd90af9e22" rel="nofollow noreferrer">Extract Data Data Source</a> (which is linked to the Google Sheets Data Source).</p>
  <p>Finally, I setup a test <a href="https://datastudio.google.com/reporting/7d50bde0-a857-461b-919e-289952f9d6f9/page/Etb2C" rel="nofollow noreferrer">Dashboard</a>.    The top table is using the Google Sheets data source, while the bottom table is using the  Extract Data data source.</p>
  <p>In the top table (Google Sheets), the MEDIAN value is calculated correctly for for an even number of series number, by finding the MEAN value of the 2 middle values.</p>
  <p>In the bottom table (Extract Data), the MEDIAN value is calculated incorrectly.   Instead of the MEAN of the 2 middle values, the greater of the 2 middle values is returned.   This is shown in Metric A and Metric B.
  Details</p>
  <p>I'm not sure of a way to get this to work with the Extract Data connection.   Seems to me a bug with the Extract Data connector and/or Data Studio.</p>
  <p>Note: I have cross-posted this in the Google Community forum <a href="https://support.google.com/datastudio/thread/179977517?hl=en" rel="nofollow noreferrer">here</a>.</p>