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

Check continuous Months in Row Value

divyakavishwar
5 - Atom

Hi Team,

 

I have a use case where I need to identify the records which doesn't have continuous month's.

For Example,

 Input data

namevalueMonth
1red1Jan
1red1Feb
2red2Jan
2red2Mar
2red2Apr

 

output data

namevalueMonth
2red2Jan
2red2Mar
2red2Apr

 

Can anyone help please 

5 REPLIES 5
JosephSerpis
17 - Castor
17 - Castor

Hi @divyakavishwar I mocked up a workflow let me know what you think?

grossal
15 - Aurora
15 - Aurora

Hi @divyakavishwar,

 

you could do this using a combination of Sort and Multi-Row-Formulas:

 

grossal_0-1588607521657.png

 

What happens:

- I created a table with Month and Month numbers to make it easier: 

grossal_1-1588607563080.png

- We join both together and sort it

- Multi-Row-Formula to find the bad ones

- Sort them and another Multi-Row-Formula to mark all bad if one is bad

- Filter only the bad ones

- Sort to get the original order

 

Result:

grossal_2-1588607636901.png

 

 

Workflow attached. Let me know what you think.

 

Best

Alex

 

neilgallen
12 - Quasar

different approach, using fewer tools. That said, this will not work if your data ever crosses years (i.e. the records contain more than one year and go from December to January). In that case you'd need a year field in order to account for the difference.

 

continuous months.png

divyakavishwar
5 - Atom

Hi @neilgallen,

 

Thanks for the solution, Solution provided worked perfectly. 🙂

 

Regards

divyakavishwar
5 - Atom

Thank you @grossal

Labels
Top Solution Authors