Week-based calendars are used in many companies as their fiscal calendars. The total weeks in a fiscal year is 52 weeks, that is, 364 days. Each quarter has 13 weeks. There are 3 varieties of 13 weeks: 5-4-4, 4-5-4 and 4-4-5 weeks per quarter. In leap years, there are 53 weeks or 371 days. IRS has created special code for the 52-53-week fiscal years.

Each company's week-based fiscal calendar will differ in 4 ways:

- define the 13-week quarter as 5-4-4, 4-5-4 or 4-4-5
- define its own start week 
- define its own way of placing the leap week
- define the first day of week as Sunday, Monday etc.

Please refer to each company's official fiscal calendar for the exact design. This post is just a reference for the conversion of a common date to fiscal dates under given rules.

Apple's Fiscal Calendar is widely disseminated on the web. Here we try to clarify some of the misunderstandings and provide calculation assistance in Tableau for analyzing time series based on the 5-4-4 format. We will use Apple's fiscal calendar as an example below.

Common Fiscal Year

In a common year, it's a 52-week year which has 52x7 = 364 days.

A year has 4 quarters and each quarter has 3 fiscal periods/months. 

Each quarter has 13 weeks.

At Apple, the first period of a quarter has 5 weeks and the other two have 4 weeks each. It's thus called a 5-4-4 calendar.

First Week of a Fiscal Year

For a week-based calendar, it is very important to understand the definition of its first week. Each company may have a different definition of the first week.

For Apple's fiscal calendar, its first week is the one that always includes October 1st. This week is the first one of the next fiscal year. For example, the week that includes 10/1/2022 is the first week of fiscal year 2023.

First Day of a Week

In Apple's fiscal calendar it's always a Sunday. There may be other conventions where we need to change the following calculations.

Leap Rule

Every 6 years or so, there will be a leap fiscal year. 

A leap fiscal year will have 53 weeks, one more week than the common fiscal year. 

The cause of the leap fiscal year is as follows:

- A common fiscal year has 364 days while a common calendar year has 365 days. It is 1 day less than the calendar year. It seems that every 7 years, we need to add a week to the common fiscal year to realign the starting dates of fiscal years. But the 7-year frequency is broken by the leap calendar years because a calendar year doesn't always have 365 days. This makes it a lot less predictable when guessing which year is a leap year.

- A calendar year has its own leap year which has 366 days. This happens on every 4 years on the years divisible by 4 and excluding the years that can be divided by 100 but can't be divided by 400.   

The leap years in the next 100 years and the gaps in between.

Leap Week

In a leap fiscal year, there will be an extra week or a leap week. Where to place it depends on the company. In Apple's fiscal calendar, it's added in the third fiscal month which becomes a 5-week month during a leap fiscal year. That is, we insert the leap week after the 13th week of the fiscal year. Or the 14th week of a leap fiscal year is the leap week.

Placement of the Leap Week

We have an extra week in a leap fiscal year. It is appended to the end of the first fiscal quarter or the 3rd fiscal month/period. Thus, the first fiscal quarter, instead of 5-4-4 quarter and having 13 weeks, it becomes 5-4-5 quarter and having 14 weeks.

How to Determine if a Fiscal Year is a Leap Year?

This is easy. Just find out if October 1st in two consecutive years has a gap of 53 or 52 weeks. If 53 weeks, it is a leap year for sure.  So, use this logical formula:

The First Day of a Fiscal Year

The Sunday of the first week is the first day of the fiscal year.

In Tableau formula, we can easily derive the first day of a fiscal year. For example for the fiscal year 2023, the first day is:

DATETRUNC('week', MAKEDATE(FiscYear-1,10,1))

Some says the first day is always the last Sunday of September. This is not exact. It's only about 6/7 correct. It's the Sunday within Sept 25th - Oct 1st. 

The Last Day of a Fiscal Year

It's actually the last Saturday in September. For any FiscYear, the last day is the first day of the next FiscYear minus one.

DATETRUNC('week', MAKEDATE(FiscYear,10,1))-1

Convert a Date to Fiscal Year/Quarter/Month/Week?

Here are the Tableau formula we can use to convert a regular date to its corresponding fiscal date. Note that they are dependent on the ones above them.

- What fiscal year is it in? We got FiscYear which is dependent on Order Date alone.

- What fiscal week is it in? We got FiscWeek which is dependent on Order Date and FiscYear.

- What fiscal month (period) is it in? We got FiscMonth which is dependent on FiscWeek and Leap Year T|F. (Credit Steve Fenn

- What fiscal quarter is it in? We got FiscQuarter which is dependent on FiscMonth.

Conclusion

Note that each company may have its own way of defining its week-based fiscal calendar. Hope that this post can give you some ideas for deriving your own specific formula.

Feel free to download this workbook and copy over the formula if you wish. Contact @aleksoft if questions. 

0

Add a comment

Creating In-Place Help Page for Tableau Dashboards
Accommodating Variable Height in a Text Table in Tableau
A 30-Day Learning Plan for Mastering Tableau
A 30-Day Learning Plan for Mastering Tableau
Embedding Mundane Charts with Pareto Insights
Creating Pareto Chart Multiples in Tableau
A Preview of Sankey Chart Type in Tableau 2024
AI's Perception of People Looks in USA
1
AI's Perception of Top US Banks as a Dog
Multi-Level Sankey with the New Sankey Chart Type in Tableau
A First Look into the New Sankey Chart Type in Tableau
Visualizing Cross-Tab Tables with Column Sort
1
A Couple of Mismatches in Tableau's Map
Converting Date to Fiscal Calendar Date in Excel
Converting Date to Fiscal Calendar Date in Tableau
Resolving Simpson's Paradox: The Whole vs The Parts
#TweakThursday: Horizontal vs Vertical Bars
Recreating Datasaurus Dozen in Tableau
Rendering Anscombe's Quartet in Tableau
How to install database drivers for Tableau in Mac
Drawing Line Charts without Axis Offset in Tableau
Charting "Top N and Others" via Table Calculations in Tableau
Calculating YoY of Quarterly and Yearly Sums in Tableau
Imagining Tableau Social
Imagining Tableau Social
Imagining an Enhanced Formula Editor for Tableau
Imagining an Enhanced Formula Editor for Tableau
Filtering Partial Date Period in Tableau
How to Send Email from Tableau with a Template
How to Make Phone Calls from Tableau via Cisco Jabber
Labeling Trellis Chart via Stacked/Shared Axis
Sizing a Trellis Chart in Tableau
Placing Multiple Labels in Trellis Chart
Creating Compact View of a Sparse Table in Tableau
Labeling Trellis Chart Anywhere in Tableau
3
Labeling Trellis Chart in Tableau
1
Computing Spearman's Rank Correlation in Tableau
Computing Cumulative Grand Total in Tableau
Filling Down in Tableau
Pre-Filters, Post-Filters and the Order of Operations in SQL
2
Charting Project Flow via Multiple Data Densifications
Calculating Period-To-Date/PoP with Indicators for Better Performance
Counting Consecutive Occurrences in Tableau
1
Creating Bridge Chart with ARR vs AOP
Calculating the Difference Between Any Two Points in Tableau
Drilling Down with Containers
Creating Sunburst Chart via Map Layers in Tableau
Simple Calculations for YTD/YoY, QTD/QoQ, MTD/MoM and WTD/WoW in Tableau
9
One Button Sheet Swap in Tableau
One Button Sheet Swap in Tableau
2
Coloring the Area between Two Lines in Tableau
Sorting 100% Stacked Bars by Percentage
Creating Kanban Board in Tableau
4
Multiple Bars and Lines in Layers
Referencing Another Data Source without Relationship in Tableau
2
Dynamic Date Granularity and Show Missing Grains
4
Creating Global Variables in Tableau
Creating Sankey Funnel Chart via Template
59
Creating a Simple Toggle Button in Tableau
Monitoring Data Source Delay in Business Dashboard
Analysis of Tableau's Multi-Variable Clustering Algorithm
Iris Classification via Clustering in Tableau
Always Showing Empty Columns in Tableau
Creating Date Range Filter with Dynamic End Date = Max Date
5
Visualizing Crosstab and Grand Totals
Getting the Last Date/Value/Variance in Tableau
A Template for 3-Stage Sankey Chart in Tableau
26
Deselecting Button on a Different Sheet
Deselecting/De-dimming Buttons in Action-Driven Sheet Swap
3
Game of Life in Tableau
Enhancing Text Tables with Visual Background
1
20 Calculation Use Cases: LOD vs Non-LOD
Nested Sorting and Hierarchical Nested Sorting in Tableau
1
Creating 3D Bar Chart via Custom Shapes
Creating Sankey Chart with Sorting/Grouping
5
Creating Sankey Chart with Grouping
4
Enhancing Chart Contrast #TweakThursday 43
Creating a Multi-Stage Sankey Chart via Template Cascading
13
Creating Radial Stacked Bar Chart in Tableau
11
Creating Waffle Chart Multiples in Tableau
Creating Waffle Chart from a Single Percentage in Tableau
Creating Hierarchical Bar Chart in Tableau
Hiding Subtotals at Single Subcategory in Tableau
3
Making Label Text Wrap in Tableau
9
Accessing Excel Files on SharePoint from Tableau
Accessing Excel Files on SharePoint from Tableau
Creating Bar Chart Multiples In One Sheet 2/2: Different Measures
Creating Bar Chart Multiples In One Sheet 1/2: Same Measure
Using Color to Reveal More Insights #TweakThursday 42
Customizing Subtotals and Grand Totals in Tableau
4
Annotating Dual Axis with Alternative Color Legend #TweakThursday 41
A Divide-n-Conquer Approach to Counting Word Occurrence
Sorting Stacked Bars in Tableau
8
256 Cellular Automata in One Sheet
Creating Polygon Hex Maps in Tableau
Creating Joy Plot in Tableau With Fewer Steps
How Amazon failed to deliver: Analytical lessons
Polygon-based US Hex Map Revisited
Visualization, Data and Tableau Eco System
Creating Sankey Chart as Easy as 1-2-3 in Tableau
62
Tableau Licensing Cost Visual Calculator
Tableau Licensing Cost Visual Calculator
Creating 3-Way Venn Diagram with Dynamic Labels
1
Placing and Aligning Labels on Small Multiples
1
#WorkoutWednesday 35 - Superstore Small Multiples Tiled Map with Quad Chart
Creating Polygon Circumscribing Graph #MathVizMonday
Blog Archive
Loading
Dynamic Views theme. Powered by Blogger. Report Abuse.