Example Table:
Date, CustomerID
2020-01-01,a
2020-01-01,b
2020-01-01,c
2020-01-02,a
[...]
2020-01-31,a
2020-01-31,b
2020-01-31,c
2020-01-31,d
2020-02-01,a
2020-02-01,b
[...]
Let's say I have a date range set on 2020-01-01 - 2020-01-31.
Id like to calculate the difference between:
(count_distinct(CustomerId) with filter Date=2020-01-01) - (count_distinct(CustomerId) with filter Date=2020-01-31) and get the result 1.
I've tried MAX(Date)
and MIN(Date)
, however I can't find a way to use that as a filter.
When connecting to big query i can use @DS_START_DATE
, but I'd like to use this inside of data studio.
Is this possible? Thank you.