0

Suppose I have a table like the following:

Date          Price
01/01/2021    $0.10.  <--- new val
01/02/2021    $0.10
01/03/2021    $0.10
01/04/2021    $0.10
01/05/2021    $0.70.  <--- new val
01/06/2021    $0.70
01/07/2021    $1.10   <--- new val
01/08/2021    $1.10

How can I find out the three dates - 01/01/2021, 01/05/2021, and 01/07/2021 within Looker?

Neel
  • 9,913
  • 16
  • 52
  • 74

1 Answers1

0

Assuming this is your entire set, you could group by "Price" and then take the min(Date), something like:

derived_table: {
sql:
  SELECT
    price,
    MIN(DATE) AS min_inflection_date
  FROM
    table_name
  GROUP BY
    price ;;  }

See also this post: How to find stock turning price points

GiladZa789
  • 111
  • 1
  • 7