When using the Tableau date functions, such as DATEPART(), the fiscal year start is ignored.
For example, if the fiscal year is set to February, then DATEPART('month', #2/1/2022#) will return 2 even though February should be the first month.
The date functions currently return values based on the calendar year by design.
Use DATEADD('month',...) to shift the actual date to the corresponding relative date. For example, if February is the first month of the fiscal year, then February should be shifted to next January. Follow along in the sample packaged workbook found in the Attachments section of this article and see the Additional Resources section below for further explanation and notes.
DATEPART('year', DATEADD('month', 11, [Order Date]) )
The following video demonstrates the steps listed above. Note: the video has no sound.
DATE( "2/1/" + STR( YEAR( DATEADD( 'month', 11, [Order Date] ))))
DATEDIFF('week',[First fiscal day],[Order Date]) +1
The video demonstrates the steps listed in Example 2. Note: the video has no sound.
The standard definition of a fiscal year uses the calendar year number for the last month of the fiscal year. A fiscal year from Feb 1, 2022 to Jan 31, 2023 would be referred to as FY 2023. For this standard, dates should be shifted to their corresponding relative dates in the next calendar year.
For example, the date #2/1/2022# should be shifted to #1/1/2023#. This will allow DATETRUNC('month', DATEADD('month', 11, [Original Date Field] ) ) to return the correct month number (1) and the correct year number (2023).
| Fiscal Year Starting Month | # of months to add |
|---|---|
| February | 11 |
| March | 10 |
| April | 9 |
| May | 8 |
| June | 7 |
| July | 6 |
| August | 5 |
| September | 4 |
| October | 3 |
| November | 2 |
| December | 1 |
Voice your support for the inclusion of the enhancement to Make Date functions work when setting fiscal year different than January in the Salesforce Idea Exchange.
001473696
1216 KB

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.