General Discussions

Discuss any topics that are not product-specific here.

A calculated field that displays the week of the month

ChrisBurger
5 - Atom

Hi all,

 

I am having some trouble with creating a calculated field that shows the week of the month starting on Sunday and ending on Saturday. My main issue is that when a current week is in progress and a new month starts it stops the current week and starts a new one. I need it to continue out the current week before starting the first week of the new month.

 

For example, if we are on week five of October and the last day of October is on Wednesday and Thursday is November 1st then I want it to finish up week 5 of October all the way to Saturday the 4th and then start the first week of November on Sunday the 5th.

 

How do I alter my current code to be able to do this?

 

ToNumber(Ceil((DateTimeDay([po_date])+ToNumber(DateTimeFormat(Left([po_date],7)+ '01',"%w")))/7))

1 REPLY 1
caltang
17 - Castor
17 - Castor

I believe this will help: https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Week-Number-Calculation-Starti... 

Calvin Tang
Alteryx ACE
https://www.linkedin.com/in/calvintangkw/
Polls
We’re dying to get your help in determining what the new profile picture frame should be this Halloween. Cast your vote and help us haunt the Community with the best spooky character.
Don’t ghost us—pick your favorite now!
Labels