date range filter

hello,

i want to link a scorecard to start and end date of subscription so when i select a date range in the filter i get an update with what was happening in the selected date range 
example: a customer's subscription starts and ends 1/1/2023 - 12-31-2023 

i want when the date range is set to for example april-october/2023 i receive that this customer is still during the subscription period or "active"

0 1 98
1 REPLY 1

I'm not sure if this is possible in Looker Studio, but I think you could write a field in Looker to capture this logic.

Assumptions: 

  • The date field that you are filtering on is named "user_filter"
  • You have a date dimension group named "subscription_start" that has the "raw" timeframe (this timeframe makes it easier to do date comparison in most databases using just the < and > operators)
  • You have a date dimension group named "subscription_end" that has the "raw" timeframe

Then you could write something like this, taking advantage of the "date_start" and "date_end" liquid parameters:

Something like this:

dimension: is_subscribed {
   type: yesno
   sql: {% date_start user_filter %} > ${subscription_start_raw} AND {% date_end user_filter %} < ${subscription_end_raw} ;;
}