Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

If then statement + X or Vlookup + Loop

cchueh
7 - Meteor

Hello,

 

I have guest name in column A, and all the dates as header rows for the date the guest stayed at the site. The "c" in each cell indicated that person stayed on that specific date, for example person G, stayed from January 2 and onwards.

 

Below is my input:

 

cchueh_0-1592530248703.png

 

I would like my output to have a new column like below columns in blue with a Check In and Check Out date where it takes the first "c" in the range of row per guest to bring the header row as check in date and the last "c" as check out date. Loop is also required to be built in that would be great, in case if there is a break in between. 

 

cchueh_1-1592530659666.png

 

Any help would be highly appreciated!!

5 REPLIES 5
fmvizcaino
17 - Castor
17 - Castor

Hi @cchueh ,

 

I'm attaching here an example showing one way to solve this problem. I've tried to comment each step to make it clear.

fmvizcaino_0-1592542117043.png

 

 

Best,

Fernando Vizcaino

seinchyiwoo
Alteryx Alumni (Retired)

Hey,

 

You don't really need looping but just a little bit of multi-row to identify different stay of each guest.

seinchyiwoo_0-1592542209130.png

 

I have attached the workflow that does what you want. 

See if you can reverse engineer and understand the whole thought process 🙂

 

Cheers,

Seinchyi

cchueh
7 - Meteor

Thank you so much! It works!

 

 

 

cchueh
7 - Meteor

Thank you for including the comments for each icon to let me know how each step works!

cchueh
7 - Meteor

 

If I had duplicated guest names in column A, the formulas doesn't pick up the duplicated names i.e. Person A who may have almost the exact same check in dates but the formula only picks it once or doesn't pick it up, would you be able to assist?

 
 
 
 
 
 

 

 

Labels