Start Free Trial

Alteryx Designer Desktop Discussions

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

Date to Serial

berty
8 - Asteroid

I'm looking to convert a date to serial .. like this:

 

21/04/2022 = 3 

01/03/2022= 2

10/02/2022=1

25/05/2022= 0 (current month)

 

 

I have a report i run  monthly where i need to find the data for the last 3 months and assign a serial number as described above but not sure if this is possible?

 

any suggestions?

 

 

 

 

6 REPLIES 6
Sebastiaandb
12 - Quasar

Hi @berty ,

 

Here you go

 

Sebastiaandb_0-1653485070500.png

Greetings,

 

Seb

DataNath
17 - Castor
17 - Castor

A bit of an extended workaround to get it in the order/format that you want, but this works for your example:

 

DataNath_0-1653485277436.png

 

If, in your live data, you have loads of additional months (i.e. not just the most recent 3) and you need to find those as stated then just add a filter after the datetimediff calculation, with the condition that [Serial] =< 3

 

berty
8 - Asteroid

Hmm,  for both examples - if i change one the dates to 27/04/2022 i should get serial 3 but for some reason i get serial 0 indicating current month?

DataNath
17 - Castor
17 - Castor

@berty have modified the workflow. See if this works?

berty
8 - Asteroid

Just came across an issue with one of the dates - the date for the 31st May shows as serial 3,  and the 10/06/2022 as serial 2 

berty_0-1663073687555.png

- how do i configure this to show the June data as serial 2?

 

DataNath
17 - Castor
17 - Castor

@berty been a while since I've seen this! Does this help? I just changed the date calc.

Labels
Top Solution Authors