I have a dataset that has duplicates. It looks like this:
Order | Price |
---|---|
1 | 2 |
1 | 2 |
1 | 2 |
2 | 3 |
3 | 4 |
4 | 8 |
4 | 8 |
4 | 8 |
4 | 8 |
5 | 10 |
When I calculate the median in looker it is returning 6. I’d like to be able to tell Looker to group, or ignore, the duplicates and treat the data as if it were:
Order | Price |
---|---|
1 | 2 |
2 | 3 |
3 | 4 |
4 | 8 |
5 | 10 |
The median of this data set would be 4. Is there a way to get Looker to do this?
Hey @JohnTiger
Probably in this case I would create a derived table considering all the distinct prices and join it to add the median value of only the distinct values.