Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

Dividing Columns by another column

dkapadia
5 - Atom

Hi All,

 

Hopefully this makes sense, but I have a workflow that has a bunch of columns that I want to create allocation keys for. I have a set of columns that are broken out by account and another set of columns that have the total for that account. Example below:

 

ProductAccount XAccount YAccount ZAllocation for Account XAllocation for Account YAllocation for Account Z

Product 1

102535

30

6065
Product 215510306065
Product 353020306065

 

What I want to get to is the below in bold. Doesn't have to be overwriting the columns, happy for it to be new columns if that is easier. 

 

ProductAccount XAccount YAccount ZAllocation for Account XAllocation for Account YAllocation for Account Z

Product 1

10253533%42%54%
Product 21551050%8%15%
Product 35302017%50%31%

 

Here is the thing though, there might not always be the same number of columns every time I run it. I have a workflow that takes all existing accounts and sums them up and creates new columns. So there will always be a "Account [letter]" column and an "Allocation for Account [letter]" column. I know I can easily do a formula that just divides 1 by the other, but if for some reason there is a new account or an account that is removed, would like the workflow to keep working.

 

Again, hopefully that makes sense! Thank you so much in advance!

2 REPLIES 2
DavidSkaife
13 - Pulsar

Hi @dkapadia 

 

Here is my take on it, i've ran on the assumption that the Allocation for each account will always be the total for that account:

 

DavidSkaife_0-1648756210173.png

dkapadia
5 - Atom

Thank you for the quick reply! That worked perfectly! 

Labels