Tableau :Create custom dates and a date hierarchy | Fundamentals

 Please download the dataset


Click for dataset

You're preparing a view for your team to help them analyze sales. They generally do this analysis by looking at the discrete date parts of years and quarters and do not need to drill down beyond that level of detail. Your goal is to create two custom discrete date parts of Year and Quarter for the Order Date field, assemble them into a hierarchy, and create a view with it.

Good luck!



Use the Order Date field to create a discrete quarters custom date field, and use the custom date field to show the sum of Sales in a bar chart.

  1. In the Data pane, point to Order Date, click the down-arrow, point to Create, and click Custom date.

  2. Name the custom date field Order Date (Discrete Quarters).

  3. Set Detail to Quarters.

  4. Select Date Part and click OK.

  5. Drag Sales to Rows and Order Date (Discrete Quarters) to Columns.

  6. In the Marks card, change the mark type to Bar.

Use the Order Date field to create a discrete years custom date field.

  1. In the Data pane, point to Order Date, click the down-arrow, point to Create, and click Custom date.

  2. Name the custom date field Order Date (Discrete Years).

  3. Set Detail to Years.

  4. Select Date Part and click OK.

Create a hierarchy with the custom date fields, in the view replace Order Date (Discrete Quarters) with the hierarchy, and expand the hierarchy.

  1. In the Data pane, drag Order Date (Discrete Quarters) on top of Order Date (Discrete Years).

  2. Name the hierarchy Order Date (Discrete Years to Quarters).

  3. Click OK.

  4. Drag Order Date (Discrete Years to Quarters) to Columns, and release it on Order Date (Discrete Quarters), to replace it.

  5. Expand the hierarchy to show both years and quarters.


Comments

Popular posts from this blog

Counters as Computation Tools: Counter Machines and Their Theoretical Significance

Tableau :Build a dual and combined axis chart | Fundamentals

Tableau: Create a Hierarchy | Fundamentals