I am trying to filter on last 7 available dates in a dataset.
For example I found this post filter-on-the-last-day-with-available-data that allows you to filter on the last day in your dataset but I need the last 7 days in my dataset.
How can I reword this dimension to pull this off?
dimension: latest_date {
type: yesno
sql: ${created_date} = max(${created_date}) ;;
}
Say I have a date column in my dataset that looks like this:
COMPLETED_DATE:
05/09/2022
05/06/2022
05/05/2022
05/04/2022
05/03/2022
04/20/2022
04/18/2022
04/17/2022
04/16/2022
I need looker to display the results related to the last 7 reported dates like this:
COMPLETED_DATE:
05/09/2022
05/06/2022
05/05/2022
05/04/2022
05/03/2022
04/20/2022
04/18/2022
Best answer by MikeM
View original