Loading

How to Display Week Number by Month

Data pubblicazione: Apr 13, 2024
Operazione

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

Fasi
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.
Risorse aggiuntive

Days in week per month
Numero articolo Knowledge

001453773

Allegati

week_sample.twbx

1197 KB

 
Caricamento
Salesforce Help | Article