cancel
Showing results for 
Search instead for 
Did you mean: 

WEEKOFYEAR Function - Change Start of Week to Friday from Monday at Calculated Col Level

Dennis_M
9 - Travel Pro
9 - Travel Pro

Hello Sisense Community,

I would like to change Start of Week on "WEEKOFYEAR" function to Friday from default Monday at the column level (not at general server config settings).

Is there a standard formula available?  Thanks, - Dennis

b6b94ef1-7b0d-4c55-a601-afba39cd4619.png

1 ACCEPTED SOLUTION

AssafHanina
Sisense Team Member
Sisense Team Member

Hey @Dennis_M ,

As the "WEEKOFYEAR" Started on Monday you can add additional function of ADDDAYS to consider Friday's only within the "WEEKOFYEAR" formula.

In the current approach, weekofyear(dd.[Date]) starts from Monday. Instead, by using the ADDDAYS function, the formula is modified to: weekofyear(adddays(dd.[Date], -4)), shifting the week start to Friday.

See Example:

  1. Created Dim Date (Using the Built it Custom Code for 2025 year)
  2. Created additional Custom Table with the Below Syntax

Note - Not Sure what is the intended for The Weeks between the Years (with the new year the week start from 52) but it can customize as well according to your needs 

AssafHanina_0-1740407120306.png

I hope this helps to resolve the issue

best regards

Assaf

View solution in original post

3 REPLIES 3

AssafHanina
Sisense Team Member
Sisense Team Member

Hey @Dennis_M ,

As the "WEEKOFYEAR" Started on Monday you can add additional function of ADDDAYS to consider Friday's only within the "WEEKOFYEAR" formula.

In the current approach, weekofyear(dd.[Date]) starts from Monday. Instead, by using the ADDDAYS function, the formula is modified to: weekofyear(adddays(dd.[Date], -4)), shifting the week start to Friday.

See Example:

  1. Created Dim Date (Using the Built it Custom Code for 2025 year)
  2. Created additional Custom Table with the Below Syntax

Note - Not Sure what is the intended for The Weeks between the Years (with the new year the week start from 52) but it can customize as well according to your needs 

AssafHanina_0-1740407120306.png

I hope this helps to resolve the issue

best regards

Assaf

THANK YOU Assaf!  Your simple solution is exactly what I was looking for.  - D

AssafHanina
Sisense Team Member
Sisense Team Member

you are welcome @Dennis_M 

Assaf

Type a product name