Date Range Control - doesn't work with a parameter

mrl33
New Member

Hello All,

I am building a report with a parameter (drop-down) that allows users to select predefined date ranges, such as "Today vs. Today Last Year," "Last 7 Days vs. Previous 7 Days," "This Year vs. Last Year," and so on. All data modeling is done in Redshift, while Looker Studio is used solely for visualizing data from the data source. In other words, the date range is predefined.

I added another option to the parameter list to allow users to manually select date ranges using the Date Range Control visual. I named this option "Custom Date" and added a Date Range Picker. However, after adding the date picker, all visuals displayed "No data."

Originally, all visuals had their Date Range Dimension set to "max date," and the data displayed correctly. I then updated the Date Range Dimension to the following calculated field (_SW_date_picker), which caused all visuals to stop showing data:

 

 

CASE
WHEN Time Period Comparison IN ("dod", "wow", "mom", "qoq", "yoy", "ytd", "cwow")
THEN NULL
ELSE Date
END

 

 

Screenshot 2025-02-19 at 1.09.56 PM.png

If I remove _SW_date_picker from a visual's Date Range Dimension, the data displays correctly—except when selecting "Custom Date," where no data appears for the selected date range.

Below is the calculated field I use to display revenue metrics based on the selected parameter value:

 

 

CASE  
    WHEN Time Period Comparison = "dod" THEN d_cy_revenue  
    WHEN Time Period Comparison = "wow" THEN w_cy_revenue  
    WHEN Time Period Comparison = "mom" THEN m_cy_revenue  
    WHEN Time Period Comparison = "qoq" THEN q_cy_revenue  
    WHEN Time Period Comparison = "yoy" THEN cy_revenue  
    WHEN Time Period Comparison = "ytd" THEN cy_revenue  
    WHEN Time Period Comparison = "cwow" THEN w_cy_l7_revenue  
    WHEN Time Period Comparison = "cdate" THEN custom_date_revenue  
    ELSE NULL  
END

 

 

The goal is for the Date Range Selector to function when the user selects "Custom Date" from the drop-down menu, allowing them to pick a date range manually. Otherwise, predefined metric values (e.g., d_cy_revenue, w_cy_revenue, etc.) should be displayed.

Please advise

 

0 0 43