KNOWLEDGE BASE

How to Display Week Number by Month


Published: 01 Oct 2019
Last Modified Date: 02 Oct 2019

Question

How to display week number by month. By default week number is displayed by year. 
 

Environment

Tableau Desktop

Answer

The following steps are displayed in the attached workbook called "week_sample.twbx" found in the upper right hand corner of this page. A fixed Level of Detail (LOD) expression is used.
  1. Create a [Week-min] calculation field as shown below: { FIXED MONTH([Order Date]):MIN(DATEPART('week',[Order Date]))}

  2. Create a [Week-updated] calculation field as shown below CASE DATEPART('week',[Order Date]) WHEN [Week-min] THEN "Week 1" WHEN [Week-min]+1 THEN "Week 2" WHEN [Week-min]+2 THEN "Week 3" WHEN [Week-min]+3 THEN "Week 4" WHEN [Week-min]+4 THEN "Week 5" WHEN [Week-min]+5 THEN "Week 6" END
Note: The attached workbook was built in Tableau Desktop 2019.3.0.

Additional Information


Days in week per month
Did this article resolve the issue?