Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

How to?

Kathyapaola15
6 - Meteoroid

Good Afternoon Everyone!

 

So I have a question. I have a column in alteryx named "ID User" and another column named "Year." Illustrated below: 

 

ID USER    YEAR

53               2016

53               2017

53               2019

61              2016

61              2018

 

What I am trying to do in Alteryx is that I want to know if ID "53" from the "ID USER" column, came back to the organization Year-Over-Year; like if he came 2016 and 2017 to get a "1" as a result, and if NOT (which is the case of ID "61"), to be a "0". ID "61" would not count because he came back but until 2018 not 2017.

 

THANK YOU!!!! I WILL REALLY APPRECIATE THE HELP. 

 

3 REPLIES 3
c-lopez
Alteryx
Alteryx

Hi @Kathyapaola15,

 

I added another entry just to illustrate the point further. You're going to want a multi-row formula to look at the next year of every entry if the year is 1 greater than the current then this means they attended year over year at least once.

 

c-lopez_1-1595018271896.png

 

I hope this helps

Kathyapaola15
6 - Meteoroid

Hello! I tried to do what you did but I was not able too! I will attach some images so you can understand me better. 

 

Thank you SO much! 

 

 

c-lopez
Alteryx
Alteryx

I think I see why you might want to try applying the formula like this

"if [Row+1:Season Year Start] = [Season Year Start]+1 then 1 else 0 endif"

 

the +1 is important because you want to check if the next row contains the next consecutive year 🙂

 

I hope this helps

Labels