Last Modified Date: 30 Jan 2018
ResolutionCreate a calculated field that subtracts a year from the date field.
Step 1: Create the View
- In Tableau Desktop, connect to Superstore sample data.
- In Dimensions, right-click Order Date, and then select Default Properties > Fiscal Year Start > April.
- Drag Order Date to Rows.
Step 2: Create the Calculated Field
- Select Analysis > Create Calculated Field.
- In the Calculated Field dialog box that opens, do the following, and then click OK:
- Name the calculated field. In the example workbook, the calculated field is named Revised Year.
- In the formula field, create a calculated field similar to the following:
DATEADD('year', -1, [Order Date])
- In Dimensions, right-click Revised Year, and then select Default Properties > Fiscal Year Start > April.
- Drag Revised Year to Rows.
Step 3: Create a Custom Month/Year
- In Dimensions, right-click Order Date and select Create Custom Date.
- In the Create Custom Date dialog box that opens, do the following, and then click OK:
- Name the field. In the example workbook, the calculated field is named Month/Year.
- In Detail, select Month / Year.
- Drag Month/Year to Rows.
- Remove Year(Order Date) from Rows.
CauseTableau Desktop displays the fiscal year according to the calendar year of the last month in the fiscal year.
Additional InformationTo view these steps in action, see the video below:
Thank you for providing your feedback on the effectiveness of the article.
Open new Case
Training and Tutorials