Alteryx Designer Discussions

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

How to get the last X number weeks report

MilindG
10 - Fireball

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
16 - Nebula

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
11 - Bolide

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
10 - Fireball

I got it, Thank you guys!

 

Labels