Showing results for 
Search instead for 
Did you mean: 
Community Team Member
Community Team Member
This Post Explains how to create a new column that will calculate the week number of a Quarter.
Business Case
In many cases Business Analyst would like to track trends over time aggregated by quarters but broken down to the week within each quarter. 
  1. Create Custom Field based on an existing Date field
  2. Enter the following code in the formula editor:
  When getquarter(Date-Field) = 1 and weekofyear(Date-Field) > 13 then 1
  When getquarter(Date-Field) = 1 then weekofyear(Date-Field)
  When getquarter(Date-Field) = 2 then weekofyear(Date-Field) - 13
  When getquarter(Date-Field) = 3 then weekofyear(Date-Field) - 26
  When getquarter(Date-Field) = 4 then weekofyear(Date-Field) - 39
  1. Rebuild Elasticube
  2. Create a widget where the data is aggregated by quarter and broken down to weeks within a quarter as seen below:
Version history
Last update:
‎03-02-2023 08:33 AM
Updated by:
Community Toolbox

Recommended quick links to assist you in optimizing your community experience:

Developers Group:

Product Feedback Forum:

Need additional support?:

Submit a Support Request

The Legal Stuff

Have a question about the Sisense Community?

Email [email protected]

Share this page: