Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

How to get the last X number weeks report

MilindG
12 - Quasar

My date format is Weekyear IE 202232, 202231 and so on. I need to get the report for last 13 weeks. 

Please help? Thank you.

3 REPLIES 3
Luke_C
17 - Castor
17 - Castor

Can you expand on your use case? Are you filtering a field in your data set? Looking to get 13 files from a directory? Etc.

 

There are two ways you could do this:

  1. Convert your weekyears to dates and use datetime formulas. This can be complicated.
  2. Convert your weekyear field to numeric, find the max value, and then filter to anything greater than the max minus 13. 
flying008
15 - Aurora

Hi,@MilindG 

 

Because Alteryx don't supported input type parse like "202231" format, so if your week already sorting by ascending, you just need use sample tool to select Last N Rows option to get it . in the case, N=13.

 

录制_2022_08_10_08_03_00_476.gif

MilindG
12 - Quasar

I got it, Thank you guys!

 

Labels
Top Solution Authors