We have introduced components to add more objects into your dashboard including text, date selectors, and dropdown menus.

Components

Date selector

To configure a date selector:

  1. Label the component in the left panel.

  2. Select whether you want to enable time selection.

  3. Use the variable created in your SQL query to determine where to filter for the date range

For in-between date ranges, you can use two separate Date selectors and the where statements such as below

WHERE 1=1 [[AND date > {{element1}}]]
					[[AND date < {{element2}}]]

Example

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/623d424b-7d36-4fcd-afb2-8c16e62b9a8f/Screen_Shot_2020-11-17_at_8.09.07_PM.png

<aside> 💡 For users connected to a BigQuery warehouse, you will need to cast the data variable to the correct data type using the code below.

</aside>

--for casting to date type
WHERE 1=1 [[AND date_field >= DATE({{element1}})]]
					[[AND date_field <= DATE({{element2}})]]
					[[AND DATE(date_field) = DATE({{element3}}]]

--for casting to timestamp type
WHERE 1=1 [[AND date_time >= TIMESTAMP({{element1}})]]
					[[AND date_time <= TIMESTAMP({{element2}})]]
					[[AND TIMESTAMP(date_time) = TIMESTAMP({{element2}})]]

Dropdown

To configure a dropdown menu:

  1. Label the dropdown.
  2. Enter a placeholder for when no option is selected.