Alteryx Designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
ALTER.NEXT:

Join us on Dec 2 for a half-day virtual analytics + data science event!
US & CA customers only

SAVE YOUR SPOT
It's the most wonderful time of the year - Santalytics 2020 is here! This year, Santa's workshop needs the help of the Alteryx Community to help get back on track, so head over to the Group Hub for all the info to get started!
SOLVED

Joining Two Tables and applying where conditions

Highlighted
5 - Atom

Hello Everyone,

 

I am trying to find a solution to below situation where I need an output based on merging 2 tables and applying some condition as below:

 

Table1: 

IDsSegmentStart DateEnd Date
AYellow1/1/202012/31/2020
ARed6/1/201912/31/2019
BBlue5/1/201812/31/2018

 

Table2:

IDDateClaims
A8/1/201913
A6/1/2020145
B1/1/201412

 

Final Output I want:

IDsSegmentClaims
AYellow145
ARed13
B<null>12

 

So basically the problem is like this: 

  • I need an output which would tell me that for all IDs in Table 2 how many claims were falling in between the dates (Start Date and End Date) in Table 1 and then append their Segment from Table 1
  • So, from the above tables for ID "B" since the "Date" in Table 2 is outside the range given for B in Table 1, therefore, it should display a blank in the "segment" column for B
  • Table 2 is my parent table i.e. I want data for all the IDs in Table 2 and if any ID is present in Table 1 and not in Table 2 then we can ignore that

 

Hope I am able to explain this. What should be the best way to handle such things in Alteryx?

 

Thanks in advance!

Highlighted
Alteryx Certified Partner
Alteryx Certified Partner

Hi @USER132991, the approach in the attached solution is one way I think you can address your problem statement:

AbhilashR_0-1601394075035.png 

Highlighted
5 - Atom

Thank you. This has worked flawlessly 🙂

Highlighted
Community Manager
Community Manager

Hi @USER132991

 

Thank you for your question to the Community!

 

I moved your post to the Designer Discussions forum there you can ask anything technical about Designer. 

 

This article "Q&A: Where Do I Post My Questions?" should also help you out. 

 

Could you please mark @AbhilashR answer as "Solution" ? It will help other users. 

 

Thank you and have a very nice day!

Cheers,

 

StephJ
Labels