London, UK

Welcome to the London User Group

Click in the JOIN GROUP button in Home to follow our news and attend our events!

Ordering Month, Year to WeekNumber, Year.

stj1120
8 - Asteroid

Hi all,

 

Please help me out in alingning the Month, Year which is present in 'SNP Month' column to the 'WeekNumber'

Kindly check the attached excel file for the data and provide me few suggestions or a workflow. 

 

Thanks in advance.

 

Best Regards,

Sreenivasa Teja.

2 REPLIES 2
stj1120
8 - Asteroid

Also help me out with the logic on how to get the all associated weekNumbers for the particular month in a Year. 

 

For example:

 

  Input             Output

Jan - 2019     01.2019

Jan - 2019     02.2019

Jan - 2019     03.2019

Jan - 2019     04.2019 

 

Thanks in advance. 

Joe_Lipski
13 - Pulsar
13 - Pulsar

Hi @stj1120 

 

Just an FYI, but it's probably better to post these kind of questions on the Designer Discussions board as you're much more likely to get a quick response as there are so many more people on those boards compared to the London User Group Board.

 

To answer your requests, you will need to think about how you want to do this as a Month does not map perfectly to a week number, so it's not as simple and turning to a date and then doing a join. If you want to do the join based on the week number of the first week in that month then you can covert to a week number using this formula: 

 

tonumber(DateTimeFormat([DateTime_Out],"%W"))

 

These posts might also be of interest to you: 

 

https://community.alteryx.com/t5/Alteryx-Designer-Discussions/Convert-date-to-week-number-of-that-ye...

 

https://community.alteryx.com/t5/Alteryx-Designer-Discussions/Week-Number-Calculation/td-p/321991

Joe Lipski