Alteryx Designer Desktop Discussions

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

Data search and replicate data if not found

Shaaz
9 - Comet

Hi,

I need to check for a currencycode (USD) in my data and if that Currencycode is available then process same row.

if not available, then EUR will become as USD as new rows.

 

Case1 (Input): Here USD is available in input data

Shabaz_0-1640064965839.png

Case1 (Output): Hence no change to the output

Shabaz_1-1640065005674.png

 

Case2 (Input): Here USD is missing in input data

Shabaz_2-1640065037939.png

Case2 (Output): I've make to add a condition USD = EUR and then bring new row of USD

Shabaz_3-1640065088621.png

 

 

 

3 REPLIES 3
BobR
8 - Asteroid

Attached is a sample workflow that does what you are looking for. Logic is in a macro in the package that way I could send both of your examples to it.

Its unclear what your ultimate goal is, but if you have a master list of keys that you want and you are getting keys in a batch. One thing I've done is to union in the master list with the newly acquired keys. Using the specific order option to keep the master list second. Then I can do a unique on the key column. I'll have a second column that specifies the source of that key so later I can tell if they key came from input data or the master list.

But the example attached does the search and add as you were looking for. The macro has lots of annotations explaining why.

Qiu
20 - Arcturus
20 - Arcturus

@Shaaz 
Mine is working, but a bit lengthy.

0108-Shabaz.PNG

atcodedog05
22 - Nova
22 - Nova

Hi @Shaaz 

 

Here is my take on it. If any currency is missing from the list then its replaced with EUR data. Missing currency can be any currency except EUR since its the reference currency.

 

Workflow:

atcodedog05_0-1641641488226.png

 

Hope this helps : )

 

Labels