Issue Calculating Median

Hi,

I am trying to calculate median for differences between dates in Looker using datediff function and median in measure as shown in the following screenshot:

15f4edd5-7103-43f4-9596-ac3ede38a367.png


Seems like the median is not calculated well, for example for the following date differences:

91942303-b3a5-4a84-ad57-54fe5ce32673.png

The median calculated is 103, and not the average between 103 and 64.

The sql used to calculated the median is as shown bellow:
 

f2cb50e3-deeb-45c8-a4a0-417220c647fc.png


What is the problem?

0 0 117
0 REPLIES 0
Top Labels in this Space
Top Solution Authors