Alert: There is a planned Community maintenance outage October 16th from approximately 10 - 11 PM PST. During this time the Alteryx Community will be inaccessible. Thank you for your understanding!

Alteryx Designer Desktop Discussions

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

look up and join with current date and day

ankitpaul7
6 - Meteoroid

Hi Guys,

 

Am quite new to alteryx.  I need suggestion on this-

 

 there is one id which is functional in (mon,tues) and there is another id which may be functional in (mon,wed). So i need to create a column which should match up the day in the other file ( where only date is there)  and if that Id is not mapped in that particular day  then there should be a flag.

 

In short i have day in one file and date in other file with a common key available. How should i create a look up in this?

 

 

Let me know if it is clear or not. 

 

Thanks in advance folks! :)

 

 

 

16 REPLIES 16
ankitpaul7
6 - Meteoroid

Refer this excel attached.

danilang
19 - Altair
19 - Altair

This latest sample data makes it much clearer.  This is like a work schedule.  A works Mon,Tue,Thu,Fri.  For all of A's records in table 2, you want to see a yes on the days when she is supposed to work and a no when she is not.  Is this correct?

 

I cleaned up the date for line 6 in sheet2 to match the format of the other ones.  

 

Dan

ankitpaul7
6 - Meteoroid

Yes.. Precisely.. can you share the flow?

 

Thanks for this.. Much appreciated

danilang
19 - Altair
19 - Altair

Here you go

 

Solution v2.0.png

 

Dan

Kenda
16 - Nebula
16 - Nebula

Hi @ankitpaul7

 

I have attached a workflow that I think accomplished what you're looking for. 

 

The first Formula tool just cleans up that one messy date.

 

After the join, I simply added a Formula with the following expression:

iif(contains([Days per Week],substring(datetimeformat(DateTimeParse([Current date],"%Y-%m-%d"),"%A"),0,3)),"yes","no")

Basically what this is doing is changing your date field into an actual date (with the date time parse) then changing it to the day value (with the date time format) then only keeps the first three letters for that day value (with the substring) and lastly checks if your Days per Week field contains those three letters. If it does, it will put a value of yes and will put a value of no otherwise.

 

1.PNG

 

See the attached 2018.1 workflow. If you have a version prior to 2018.1, change the version number of the file by right clicking on the workflow and selecting Edit with Notepad++.

ankitpaul7
6 - Meteoroid

Thanks a lot Danilang! Thanks for such a prompt response. This really helps.

 

 

This community is great. Love it!

 

ankitpaul7
6 - Meteoroid

Thanks @Kenda .. your solution, I have not tried but the inputs are quite good. I will make a note of it. I might use the date time formula in future tasks.

 

@danilang - Solution was quite apt for me. Thanks for it.

 

 

Labels