How to Split Month and Year in Tableau Using Custom Date Calculations

preview_player
Показать описание
I’ve searched for the order date field that’s my date field in this case and click the drop down on order date and click create custom date. I’m going to call it year.
And change it to year we can choose either date part or date value the difference is date part is only the date only the year of order date so if it’s January 1st uh 2020 it’s just going to extract 2020. Date value is truncating the date to the first so if the date is January 2nd it changes it to January 1st let’s start with Day part.
Let’s bring my year field into the view and you can see I have 2019 20 21 22. Let’s do that again by grabbing order date. Create custom date. Year two we want a year again this time and this time we want the date value.
Let’s right click year two drag it to The View let’s choose month day year and you can see that the date is now January 1st 2019 January 1st 2020 and so on do the same thing with order date and months I’m going to drop down on order date create custom date and let’s change call this month and change it to month date part version click ok let’s search for a month bring that into the view. You can see that I get January February March April for each year.
Click on order date again I’m gonna do the date trunk month this time create custom date call this month to change it to month and date value click ok search for a month. Right click the date to bring it into the view. And let’s show it as month day year. So now you can see for 2019 defaulted to January 1st 2019 March 1st 2019 and so on and for 2020 it’s April 1st 2020 May 1st 2020. And that’s creating dates in Tableau hope this helps.
Рекомендации по теме