Start Free Trial

Alteryx Designer Desktop Discussions

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

Help to replicate logic to formula in Alteryx

AhanaR
7 - Meteor

Hi Team,

Could you please help here? 

How can I achieve this in alteryx ? In excel I use lookup and do the calculation

 

The logic I need to replicate is as below :

 

If Document currency = "USD" then (Backlog Value in Document Currency) elseif document currency <> "USD" then (Backlog Value in Document Currency */ plan rates). Additionally, I want to add a logic that will multiply document currency with plan rate if the field market convention ="Multiply", else divide if the field says "Divide"

 

Field NameDataset Name
Backlog Value in Document CurrencyDataset 1
Document CurrencyDataset 1
Market ConventionDataset 2
Plan ratesDataset 2

 

 

Dataset 1

Sales Document NumberBacklog Value in Document CurrencyDocument CurrencyConverted Backlog Value
123697.5USD 
2351694.4USD 
23676300USD 
6799347USD 
1562420.35AFN 
250900.54DZD 
2511950.6GBP 
97417735.95EUR 
35944460FKP 

 

Dataset 2

 

Currency CodeCurrency NameMarket ConventionPlan rates
AFNAfghanistan AfghaniDivide87.49
DZDAlgerian DinarDivide136.702
AOAAngolan KwanzaDivide502
ARSArgentine PesoDivide173.91
AMDArmenian DramDivide390.3
AUDAustralian DollarMultiply0.6696
AZNAzerbaijan ManatDivide1.695
BHDBahraini DinarDivide0.37697
BDTBangladesh TakaDivide105.52
2 REPLIES 2
binuacs
21 - Polaris

@AhanaR One way of doing this, I used the currency code to lookup, (if you are using a different field you can change in the find and replace tool)

 

binuacs_0-1677626555005.png

 

Tam
9 - Comet

@AhanaR  This my approach using:

Multi-row tool:

Filter Tool

And Message tool

The 2 message tools to pick up when dataset 2 is missing the currency code or when Market convention is not Multiply or Divide. 

 

config4.JPG

 

Labels
Top Solution Authors