Blogs

Implementing Dynamic Date Picker in Tableau

  • Purpose of the Article: The purpose is to help the Tableau developer to Create a Dynamic Date Calendar
  • Intended Audience: Tableau Developer
  • Tools and Technology: Tableau Desktop 2022.2
  • Keywords: Dynamic Date Picker

The following key points are covered in this blog.

  • Introduction to Tableau
  • Tableau Parameters
  • Importance of Tableau Parameters to businesses
  • Dynamic date filter in Tableau
  • Solution For Dynamic date filter In Tableau

Tableau:

The important parameters of Tableau are as follows.

  • Tableau is a business intelligence software
  • In 2003 Mountain View company designed this platform to seek better data visualization for itself. Later it became the number one software in the IT industry
  • Tableau is a specialized tool in the data mining and visualization industry
  • Tableau’s main objective is to analyze relational databases and data cubes
  • The Tableau interface queries online processing cubes, cloud databases, spreadsheets, and databases and generates graph-type visualization
  • It can create action plans for data Interpretation and presentation like collecting data, saving it in memory and accessing it.

Tableau key facts:

  • Any quantity that is filtered by the software to customize the application to a certain target is known as a Tableau Dynamic Parameter
  • Anything you can think of maybe a Tableau parameter
  • Tableau gives a company more freedom and the ability to experiment and try new things
  • The software enables the team to present to stakeholders, reports that are interactive and that can be segmented on the spot — during a vital meeting
  • Organizations need less time to prepare and pull data
  • Tableau enables team members to share current dashboards and automate the most recent data in developing analytics

Importance of Tableau Parameters in businesses:

  • Tableau allows businesses to make strategic choices based on real-time with unbiased data
  • It enables large and small companies to keep up with the massive amount of data available and the constantly evolving technology
  • It is a user-friendly data visualization platform that processes and analyses data quickly, allowing businesses to increase their performance through the use of innovative tools
  • The average Data scientist spends about 75% of their time preparing data
  • This means that on average, a data scientist is only dedicating 25% of their time to analyzing, finding actionable trends, and uncovering insights a business can use
  • Tableau filters and parameters can assist a business in increasing efficiency and optimizing business insights

Dynamic date filter:

  • The trick to creating flexible and user-friendly relative date filters in Tableau is to create sets and customize each range on the Condition tab of each set
  • Within a set, the Condition tab allows users to specify dynamic date ranges that update automatically

Solution for Dynamic date filter:

The following parameters create a dynamic date picker in tableau.

Solution for getting from Figure 1 to Figure 2.

Figure 1: Dropdown date pop-up menu

Figure 2: Calendar Date popup menu

Create A parameter:

  • The first step is to specify a parameter. For that, just click on the little arrow next to Dimensions and select Create Parameter

Figure 3: Parameter Creation

  • Next “personalize” your parameter. In order to do this, change the Data Type to “Date,” then select the value you want to appear by default (Current Value), and then define the allowable values
  • In case, a date picker Calendar is chosen where the end user opens the dashboard and shows the current date, the end user selects the previous date from the date picker calendar from field Date on the data source
  • When “Values when the workbook opens” is clocked, and “select calculated filed (Latest date)” is chosen to fetch the Latest date from Database, as shown in figure 4

Figure 4: Parameters Settings

  • A parameter shows in your data sidebar.Click on it in the bottom left-right corner and find use parameter control. We could take the below example. It is visualized in figure 5

Figure 5: Parameter Visualization

Create a Calculated field:

Step 1:

The First step is to create a Calculated field to fetch the Maximum data from the database as shown below (Image).

Step 2:

  • This will not affect your view, though, is connecting that parameter
  • Create that connection through a Calculated Field
  • To do so, click the little arrow next to Dimensions again, and this time and choose the Create Calculated Field option

  • The need is is only the data corresponding to the Selected Date (on the parameter control) be displayed
  • Calculation:

[select date] = [order date] where [select date] is a sample Parameter and the [order date] is a field from a database

  • When that condition is satisfied, this field (the calculated field named [Selected Date]) will be True; otherwise, it will be False

 

Filter your View:

  • Drag the Calculated Field to your Filters shelf (the one with the red circle in the image below) and pick the filter! Here I data from the view that has the [Selected Date] calculated field is set to True
  • The solution is to select that one (False) and tick the Exclude option (underlined with a mark in the image below)
  • That will help achieve the goal of excluding data where the [Selected Date] is false from the view.

  • That is it! Users can select a Date from a Calendar rather than a Dropdown menu, the Dynamic date filter based on the most recent data in the database is completed

Author Bio:

Picture of Thandava Krishna Gurram

Thandava Krishna Gurram

Analytics - Data Engineering

1.8 years of experience in developing Dashboards in Tableau. Experience in Tableau report developing, testing, and deploying. Experience in creating Users, Groups, and Projects on the Tableau server. Experience in creating customized and interactive dashboards using multiple data sources. Experience in SQL, Oracle Developer, and Tableau Developer. Experience in creating database objects like Tables, Functions, Views, Indexes, and other SQL statements.

Leave A Comment

Related Post

Purpose to Contact :
Purpose to Contact :
Purpose to Contact :

Purpose to Contact :
Purpose to Contact :
Purpose to Contact :

Purpose to Contact :