Reputation: 11
I got a report in Google Looker studio. In one field I need to divide the value by the number of days, according to the selected period. I understand that I can use the date_diff function, but how can I provide this function with the current values from the date range filter (which can be changed by the user)? Thanks!
Chat GPT advised me to use this to extract the dates, but it just does not work. PARSE_DATE("%Y-%m-%d", "end_date_filter_value")
Upvotes: 1
Views: 777
Reputation: 11
I just found a way:
DATE_DIFF(MAX(your_date_dimension), MIN(your_date_dimension))
Upvotes: 1