Help

IF Created time is in week no ... then

1410 4
cancel
Showing results for 
Search instead for 
Did you mean: 
Max_Ha
6 - Interface Innovator
6 - Interface Innovator

Hi everybody

I’m looking for a formula that goes like this:

IF: Created time is in week no. 40 then “A”
IF: Created time is in week no. 41 then “B”
IF: Created time is in week no. 42 then “C”

I tried to do it myself… Nearly had it (I think) But I got errors.

Can you guys help me?

4 Replies 4

Since you’re comparing the same value multiple times, I would recommend using a SWITCH() function. Your formula will look something like this:

SWITCH(
   WEEKNUM(CREATED_TIME()), 
   40, 'A', 
   41, 'B', 
   42, 'C'
)

Hi Kamille,

Thank you! That one helped me a lot. I try to do it with IF statements at first. I didn’t even know the SWITCH() function excisted. It kinda works now but I have a second problem… Is there a way to start counting the weeknumbers from sunday till sunday instead of monday till monday?

Let me know if you can help.

Thanks.

Yes. You pass either “Sunday” or “Monday” as the second argument in the WEEKNUM() function.

Thanks for the fast reply.

I think I already did it myself by adding: DATEADD({Created_time}, -1, ‘days’)

I really wonder what you thought would also work tho :slightly_smiling_face:

Gr.