To keep the field as a date you can format the date using the following steps:
- Once the date field is placed on the view, right-click and select Month (May 2015) and change the date to Discrete.
- Right-click the date field again and select Format.
- In the Header Default section click the drop-down for Dates and click Custom at the bottom of the list
- Enter YYYYMM as the new Format. This will display 23/02/2016 as 201602.
More information about using custom date formatting can be found here in the product help: http://onlinehelp.tableau.com/current/pro/desktop/en-us/help.htm#dates_custom_date_formats.html
Another option is to use a calculated field to display the date as a string. This field will not have any of the date field properties (won't be able to drill down). You can use following formula:
STR(DATEPART('year',[Order Date])) + STR(DATEPART('month',[Order Date]))
I've included a sample workbook illustrating both options. Hope this helps!
YYYYMM.twbx 1.5 MB
1. Your desired calculation is DATEPARSE('dd/MM/yyyy', [Date field])
2. After creating this field, right-click on the field and navigate to Default Properties -> Date format...
3. Scroll down on the list and click 'Custom'. Type: yyyyMM
4. Place this calculation on the worksheet, then right-click on the field and select Exact Date.