Alteryx Designer Desktop Discussions

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

Cross Multiply Rows From a Table with Columns from another based on match

Wixard
8 - Asteroid

 

Hi all,

 

Am trying to do something fairly straightforward, but trying to wrap my head around how....

 

I have 1 input table, and 2 reference tables. All tables are from different sheets in the same Excel workbook

 

 

Input Table

 

CompanySalesRevenue
A120200
B240600
C100200

 

 

 

 

Reference Table 1

 

CompanyLocationTypeSalesRevenue
AUSFixed20%35%
AUSVariable30%15%
AEuropeFixed25%40%
AAsiaVariable25%10%
BEuropeMixed45%35%
BEuropeVariable25%15%
BAsiaFixed30%50%

 

 

Reference Table 2

 

CompanyLocationTypeSalesRevenue
DefaultUSFixed20%35%
DefaultEuropeVariable80%65%

 

 

What I need to do is search the Company from the Input table against Reference Table 1 and split the Sales and Revenue absolute values in the input table by the percentages in Reference Table 1.

 

If a company is found in the input table which is not in the reference table, split the sales and revenue values based on Reference Table 2 (the default).

 

 

 

The Output table should look like this:

 

CompanyLocationTypeSalesRevenue
AUSFixed2470
AUSVariable3630
AEuropeFixed3080
AAsiaVariable3020
BEuropeMixed108210
BEuropeVariable6090
BAsiaFixed72300
CUSFixed2070
CEuropeVariable80130

 

 

Any ideas about the cleanest most elegant way to do this?

 

 

2 REPLIES 2
KimLamNg
8 - Asteroid

One way to do this.

Spoiler
KimLamNg_0-1679593315667.png

 

Wixard
8 - Asteroid

Worked perfectly - thank you so much!

Labels