cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Data Engineering
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Setting Date Range Picker to some default date

Pragati_17
New Contributor II

I have a date range picker filter in Databricks Lakeview Dashboard, so when i open dashboard there is no date selected and i want to set a default date. Is that possible with lakeview dashboard filters?

2 REPLIES 2

Kaniz
Community Manager
Community Manager

Hi @Pragati_17, You can set a default date for your date range picker filter in Databricks Lakeview Dashboards.

Hereโ€™s how:

1. Create a Lakeview Dashboard:


- Click New in the sidebar and select Lakeview Dashboard.
- Your new dashboard is automatically named with its creation timestamp and stored in your /Workspace/Users/<username> directory. You can also create a new Lakeview dashboard from the Dashboards listing page or the Add button in the Workspace menu.

2. Define Datasets:
- Use the Canvas tab to create and edit widgets like visualizations, text boxes, and filters.
- Use the Data tab to define the datasets used in your dashboard. You can write SQL queries or select a Unity Catalog table or view.
- For example, you can define a dataset called โ€œTaxicab dataโ€ using a query that accesses publicly available taxicab data from New York City in 2016.

3. Create and Place a Visualization:
- Click the Canvas tab and create a visualization widget, then place it in the canvas.

4. Configure Your Visualization:
- From the Filter dropdown menu in the configuration panel, select Date range picker.
- Select the Title checkbox to create a title field on your filter.
- Click on the placeholder title and type โ€œDate rangeโ€ to rename your filter.
- From the Filter on the menu, select Taxicab_data.tpep_pickup_datetime1.

Now, when you open your Lakeview Dashboard, the date range picker filter will have the default title โ€œDate rangeโ€ and will be preconfigured to filter based on the specified dataset. You can adjust the default date range as needed! ๐Ÿ“…๐Ÿš€

Pragati_17
New Contributor II

Hi @Kaniz Thanks for the information but i have data from 2021 May till 2023 Sep and when i am selecting filter as date range picker it is filtering the vizualizations on the dashboard for the entire data and when i select some specific date range it shows data for that but when i go back and again open dashboard the filters are gone and it shows for entire data. I want to set date range by default as 2023-2023 and when user wants they can change from whatever the range they want to select from 2021-2023. If it is possible please give a solution to this. 

Welcome to Databricks Community: Lets learn, network and celebrate together

Join our fast-growing data practitioner and expert community of 80K+ members, ready to discover, help and collaborate together while making meaningful connections. 

Click here to register and join today! 

Engage in exciting technical discussions, join a group with your peers and meet our Featured Members.