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

Changing reference dates to match with the main table.

Siddhant_11
5 - Atom

Hi All,

 

I have 2 excels, a main excel named "Dates" which contains 20 random dates from January and a reference excel named "reference" which contains 5 dates from January. I have to match both the tables, find all dates of reference table in the main table and if any date is not found, reduce value of date by 1 and find again in the main table and repeat the process until a match is found of the date in the main table.

 

In the end, all dates of reference table should have its entry present in the main table. It will be extremely helpful if you guys could give in your inputs to help me solve the same. I have attached a picture indicating how the inputs as well as the output file should look like below.

 

Note- This is just a sample data set and the real data set has hundreds of entries so doing it manually takes way too much time.

 

Thanks in advance.

 

combined.PNG

7 REPLIES 7
TheOC
15 - Aurora
15 - Aurora

hey @Siddhant_11 

Sounds like a job for an iterative macro!

You can find out about these here:
https://community.alteryx.com/t5/Alteryx-Designer-Knowledge-Base/Getting-Started-with-Iterative-Macr...

I would recommend going through the learning for it, and understanding what it is before building one for your use-case.

Hope this helps,
TheOC


Bulien
Qiu
20 - Arcturus
20 - Arcturus

@Siddhant_11 
Maybe we dont need the macro.

0225-Siddhant_11.PNG

Siddhant_11
5 - Atom

Hi @Qiu, this solution most definitely does the job and is even more simplified in comparison to the one I was trying to implement. Thank you for your help.

atcodedog05
22 - Nova
22 - Nova

Hi @Siddhant_11 

 

Here is another method. This method will be more performance-optimized.

atcodedog05_0-1645794836508.png

 

Hope this helps : )

 

atcodedog05
22 - Nova
22 - Nova

And guess I was slow 😅

 

@Siddhant_11 Please take a look into this also 🙂

Siddhant_11
5 - Atom

Even though appropriate solutions have already been posted, I was able to overcome the bottleneck I was facing while earlier solving the problem. Therefore, I am sharing an alternate solution just to give better insights to anyone facing a similar problem. Thank you once again for your help.

 

Solution.PNG

 

 

 

atcodedog05
22 - Nova
22 - Nova

Interesting will definitely give a look @Siddhant_11 🙂👍

Labels