Parameters in Tableau - CNDRO Website
post-template-default,single,single-post,postid-3148,single-format-standard,bridge-core-2.9.4,qode-page-transition-enabled,ajax_fade,page_not_loaded,,qode-title-hidden,qode_grid_1300,footer_responsive_adv,hide_top_bar_on_mobile_header,qode-child-theme-ver-1.0.0,qode-theme-ver-27.8,qode-theme-bridge,qode_header_in_grid,wpb-js-composer js-comp-ver-6.7.0,vc_responsive,elementor-default,elementor-kit-2634

Parameters in Tableau

Parameters in Tableau are referred to as containers of values used to calculate and effectively enter values not present in the original dataset. These parameters can include workbook variables like dates, a string of text, a number, or a calculated field which can be used to replace the constant value in a filter or calculation.

We can also add conditions and put in a range of values for which we want to create a parameter. After that, we then incorporate these values into our reports and dashboards so we can see each change.
In this tutorial, we’ll demonstrate what the Date Field Parameter is.

Date Field Parameters in Tableau

Working with Date Parameters in Tableau helps to give users the flexibility to change date levels from years to months, from months to weeks, or from weeks to days. We’ll show this with an example below;

Step one

Open Tableau on your computer and open a new worksheet; we will use the Superstore Dataset.

Now, drag the Order Date to the Row Pane on the working area and drag the Sales to the Text under the cards. Ensure to select Table under Show Me, so it won’t be displayed as a chart.

Superstore Dataset

Step Two

We have each sales value per year, what we need to do is create our Parameter. We will do that by clicking the arrow icon in the top left corner and selecting create parameter option as shown in the image below.

The dialogue box appears and we will put in a Name(Dates Params) and select the datetype as a string. Select the list option and put in each of the values(Year, Quarter, Month, Week, Day) and press Enter Key. Follow what we did in the image below and select OK.

You will see your Parameter below the Measure Fields and right-click on it. Select Show Parameters which will be displayed on your working area for easy navigation.

Step Three

The Parameters we created aren’t in use yet except that we have to reference them in a calculated field. In this calculated field, we will select each of the fields (Year, Quarter, Month, Weeks, and Day) to match their actual calculation, so it can display each sale we have per year, quarter, month, week, and day respectively.

1CASE [Dates Params ]
3WHEN "Year" THEN STR(YEAR([Order Date]))
5WHEN "Quarter" THEN STR(YEAR([Order Date]))+"/Q"+ DATENAME('quarter', [Order Date])
7WHEN "Month" THEN DATENAME('month',[Order Date])+""+STR(YEAR([Order Date]))
9WHEN "Week" THEN "Week" + STR(DATEPART('week',[Order Date]))
11WHEN "Day" THEN STR(DATE([Order Date]))


After this, we will click on the Show Me tab to change the view from Table to chart. Thereby, we can navigate to different charts using our Parameters.

If you found this post helpful, let us know in the comments box.

No Comments

Post A Comment