Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Multipling Two Tables

TTYYQQ
5 - 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

 

 

4 REPLIES 4
rkapoor
Alteryx
Alteryx

@TTYYQQ 

 

Take a look at the attached sample workflow.

tonypreece
10 - Fireball

Hi @TTYYQQ 

 

Here's a slightly shorter way of achieving this using an append tool rather than the join that @rkapoor 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.

TTYYQQ
5 - Atom

Awesome!  Thank you so much! 

TTYYQQ
5 - Atom

Great!  Thanks! 

Labels
Top Solution Authors