Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
ttal7878
Creator
Creator

calendar-week

Hi,

In my model, I'm using calendar  that displays, day, month, year and the number of the week.

I have a problem with the week dimension

The week between 31.12.2017 and 6.1.2018 is set as weeks53, Is it possible to change it to show week1?

I've included the model with the calendar I'm using,

I would appreciate any help

1 Solution

Accepted Solutions
sunny_talwar

I think you need to set vCal_RD  = 4, instead of 7

Set vCal_RD = 4; // Reference day = This day in Jan defines week one {1..7}


Capture.PNG

View solution in original post

7 Replies
YoussefBelloum
Champion
Champion

Hi,

try this:

.

.

.

          if(Div( tempdate - WeekStart( WeekYearRefDate, 0, $(vCal_FD) ) + 7, 7 )=53,'1', Div( tempdate - WeekStart( WeekYearRefDate, 0, $(vCal_FD) ) + 7, 7 )) as WeekNumber,

.

.

.

ttal7878
Creator
Creator
Author

Sorry for the late response,

It does not work.

When I the user selects Week - 1, the selected dates are 31-12-2017 till 13.1.2018

the result I want :

Week 53 - 31.12.2017

Week 1 - 01.01.2018 till 6.1.2018

Week 2 - 07.01.2018 till 13.01.2018

And so on.....

Capture.JPG

Anil_Babu_Samineni

Can you try this Redefining the Week Numbers

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
ttal7878
Creator
Creator
Author

According to Redefining the Week Numbers, I built the Week dimension

Anil_Babu_Samineni

From there you can forecast the week based on Date field?

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
sunny_talwar

I think you need to set vCal_RD  = 4, instead of 7

Set vCal_RD = 4; // Reference day = This day in Jan defines week one {1..7}


Capture.PNG

ttal7878
Creator
Creator
Author

Thank you