Alteryx Designer Desktop Discussions

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

join between two sheet with if conditions

rightnow
5 - Atom

Hi, I am a beginner in alteryx and what an awesome platform to learn! 

 

I have a question between joining two sheets with conditions. 

 

1) I have two different sheet with similar columns. 

Number 1 sheet has only name and date, and I'd like to fill the amount column data from Number 2 sheet

Number 1 is ( the green field is the field that I need to fill based on number 2)

rightnow_0-1671377659179.png

 

Number 2 is 

rightnow_1-1671377671903.png

 

 

As you can see, they have same name, and there are many date with different amount. 

 

I;d like to bring amount information from number 2 sheet to number 1 sheet, based on the condition that ; 1) same name 2) the date range +1 month from number 1 sheet's month. 

ex) AAA with date 2022-03-13 should bring AAA with date range between 2022-03 ~ 2022-04 from sheet 2. 

 

 

I studied and learned that it could be done based on 'join' tool with if conditions... but it's not working for me. 

Could an angel help me out?

 

Thanks ! 

 

 

3 REPLIES 3
ShankerV
17 - Castor

Hi @rightnow 

 

Step 1: Join both sheets with Join tool under Name as Join column.

Step 2: Do the filter for current date + 1 month

 

You will get the output needed.

Building a workflow as you are new to Alteryx, which will help.

 

Many thanks

Shanker V

ShankerV
17 - Castor

Hi @rightnow 

 

Please find the below expected solution.

 

ShankerV_1-1671379172556.png

 

ShankerV_2-1671379186012.png

 

Note: The workflow used to achieve the solution is attached which can be downloaded to see how the solution works.

 

If you believe your problem has been resolved. Please mark helpful answers as a solution so that future users with the same problem can find them more easily!!!!

 

Many thanks

Shanker V

 

 

ShankerV
17 - Castor

Hi @rightnow 

 

Explaining how the logic works in my workflow.

 

Joining with Name in Input1 and Name in Input 2.

ShankerV_0-1671379619365.png

 

Post that, we are creating the Date column, start of the month date.

Then also creating +1 month end of date. 

ShankerV_1-1671379686722.png

 

Then filtering if the criteria matches.

 

ShankerV_2-1671379732118.png

 

Using select tool, removing the temp columns created for calulation.

 

ShankerV_3-1671379763722.png

 

If you believe your problem has been resolved. Please mark helpful answers as a solution so that future users with the same problem can find them more easily!!!!

 

Many thanks

Shanker V

 

 

 

 

 

 

Labels