Avatar

Correct answer by
Level 4

Hello @SorenDahk ,

it's because SQL performs integer division.

you have to ''trick'' sql into thinking that on your division ther is at least one float.

Try this : ToDouble(151)/7 

or this with your formula : Ceil(ToDouble((WeekDay(GetDate())+1 + DayOfYear(GetDate()))) / 7)

results : 

Amine_Abedour_0-1653385677952.png

Br,

View solution in original post