Alteryx designer Discussions

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

Multipling Two Tables

Highlighted
Atom

Dear Colleagues,

 

Thanks for your help!  I was trying to multiply two tables but cannot figure it out. I did search the community but cannot find an applicable solution. Say we have table 1 and table 2 as below. And we would like to output table 3.

 

Table 1:

PartnerOwnership %
A40%
B60%

 

Table 2:

CategoryAmount
Cash10,000
Inventory25,000
Debt-15,000

 

Table 3:

PartnerCategoryOwnership X Amount
ACash4,000
AInventory10,000
ADebt-6,000
BCash6,000
BInventory15,000
BDebt-9,000

 

 

Alteryx
Alteryx

@TTYY 

 

Take a look at the attached sample workflow.

Highlighted
Comet

Hi @TTYY 

 

Here's a slightly shorter way of achieving this using an append tool rather than the join that @RishiK provided. This assumes your Amount field doesn't contain a comma and your percentage field does contain the '%' symbol, which I've removed in the formula tool.

 

tonyp_0-1575541247969.png

 

If your amount is stored as a string with a comma present, add the following formula to remove it, assuming amounts are all tens of thousands:

tonumber(substring([Amount],0,2))*100

 

Percent I've turned to a decimal, so 40% = 0.4

 

Then it's simply Amount x Percent = Ownership x Amount.

Highlighted
Atom

Awesome!  Thank you so much! 

Highlighted
Atom

Great!  Thanks! 

Labels