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

Replace with rules of exception

Benji27
8 - Asteroid

Hello Alteryx communauty!

 

I need your help about a complex used case

 

Here details:

1st file is Data.xlsx that contains data with book, trading code, hierarchy, etc

2st file is Exceptions2.xlsx that contains rules of exception

3rd file is OutputfileData.xlsx that contains result  (yellow value of TPMethodo_Name column are expected value)

 

The aim is to update the column TPMethodo_Name  (column K) from the Data.xlsx file by the value of column  Methodology Name (column I) from Exception2.xlsx file 

 

How to read rules of Exception2.xlsx file 

Line 2 : 

If TPAgree_Code = "EQ_AMT" and TRADINGSITE = "Paris"  and STRATEGY contains the word "Options" 

Then  TPMethodo_Name <-- RS_AMM_MMO

 

Line 3: 

If TPAgree_Code = "EQ_AMT" and TRADINGSITE = "Paris"  and STRATEGY contains the word "Stock" 

Then  TPMethodo_Name <-- RS_AMM_MMO

 

Line 4 : 

If TRADINGSITE = "Shangai"  and GLOBALBUSINESSLINE contains the word "FXLM CD" 

Then  TPMethodo_Name <-- RS_SHANGAI

 

Line 5 : 

If TPAgree_Code = "EQ_AMT" and TRADINGSITE = "Hong Kong"  and STRATEGY contains the word "Futures" and SUBSTRATEGY contains the word "Japan" 

Then  TPMethodo_Name <-- RS_AMM_MMF

 

Line 6 : 

If TPAgree_Code = "CIT_OIL" 

Then  TPMethodo_Name <-- RS_CITOIL

 

Like as you see, when a value is empty, we don't take in account 

 

Here you can find the 2 files

 

Hope you can help me !

 

Many Thanks

 

13 REPLIES 13
atcodedog05
22 - Nova
22 - Nova

Hi @Benji27 

 

Can you share the expected output file.

Benji27
8 - Asteroid

Hello Yes sure I have add it on 1st post message

 

You can identify expected value with yellow color on column TPMethodo_Name  (column K) 

binuacs
20 - Arcturus

@Benji27 

binuacs_0-1646218013179.png

 

Benji27
8 - Asteroid

Thanks @binuacs but the aim is to use dynamically the values from Exception2 file as parameters not as hard values on workflow

 

Indeed, the values on Exception2 file will be updated on existing row or new row exception

DavidSkaife
13 - Pulsar

Hi @Benji27 

 

Here is my take on it:

 

DavidSkaife_1-1646218614726.png

 

 

Note you have a line that meets the rule for both Line 4 and Line 6, so it will pick up which ever comes first in the IF statement logic

Benji27
8 - Asteroid

Thanks @DavidSkaife  but the aim is to use dynamically the values from Exception2 file as parameters not as hard values on workflow

 

Indeed, the values on Exception2 file will be updated on existing row or new row exception

binuacs
20 - Arcturus

@Benji27 Okay , I thought you need to implement the formula as well, if you want to only use the values from the exception file you can remove the formula tool and adjust the fields in the join tool according to your requirement

binuacs_0-1646218965019.png

 

Benji27
8 - Asteroid

Thanks @binuacs  but the aim is to not update manually the workflow to do that

 

 

binuacs
20 - Arcturus

@Benji27 I updated the workflow based on my understanding . 

binuacs_0-1646219963854.png

 

Labels