Cyborg
Cyborg

Reputation: 1

How to merge Year ,Month and date in Order Date in Tableau?

I'm struggling to get Year,Month and Date in single column from [Order Date] in Tableau 10.

Could you help me here? I need to drill down [Order Date] to get the dates liked showed in attached Snapshot1, But I want dates in format showed in attached Snapshot2. Please refer link below to see snapshot. enter image description here Regards, Praveen Kumar

Snapshot

Upvotes: 0

Views: 2901

Answers (2)

Siva
Siva

Reputation: 9101

First you need to change the date format of the date to MDY as explained by @Iampbon which will give you month day and year format.

Now take the minimum of the date for every customer, Create a calcualted field and write below code.

WINDOW_MIN(MIN([Order Date]),FIRST(),LAST())

Here take care that default table calculation should be selected as Specific Dimensions as shown below.

enter image description here

Now change the date format of the calcualted field by right click on calcualted field --> DEfault properties --> date format

Your report should be like below:

enter image description here

Upvotes: 0

lampbob
lampbob

Reputation: 781

You currently have 3 date pills in the shelf, "YEAR(Order Date)","MONTH(Order Date)","DAY(Order Date)"

Option 1: Steps

  1. Remove two of these pills from the column shelf(it doesn't matter which ones).
  2. On the remaining date pill, when you hover over it with the mouse icon, an arrow appears to the right of the pill. Select this.
  3. On the drop down menu select the option "More -> Custom...".
  4. On the pop up window select the format you want. Here it will be Month/Day/Year

Option 2 Another way to do this is to just remove all the date pills. Then drag the order date pill back to the column shelf clicking the right mouse button when dragging it. When you drop it on the shelf it will automatically give you the date formatting option in a pop up window.

Number 6 in this guide displays how to carry out option 2 visually: https://www.tableau.com/about/blog/2016/8/take-note-these-10-handy-tableau-shortcuts-57561

Upvotes: 1

Related Questions