Alteryx Designer Desktop Discussions

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

Division in Alteryx

timewaste
8 - Asteroid

Hello Peers,

 

How do I distribute the remainder among top rows in order after I perform division as long as the remainder becomes 0 through a workflow? Please note that I do not want the final sum to be a Double datatype rather Integer datatype. Here's an example:

 

NameCount_NameMIDSumRemainderWID
G151531
G151532
G151533
G151534
G151535
G2421031
G2421032
G2421033
G2421034

 

So, if this above shown table is source data, I would want the final sum to be as shown below:

Final Sum = Reminder to be distributed across WIDs in an order as integer values as long as remainder becomes 0.

 

NameCount_NameMIDSumRemainderWIDFinal Sum
G1515316
G1515326
G1515336
G1515345
G1515355
G242103111
G242103211
G242103311
G242103410

 

Thanks!

6 REPLIES 6
ponraj
13 - Pulsar

I am not going to look into your case as I dont like your profile name. Let me know if you think that I got you:)

smille17
7 - Meteor

Can you clarify the example? It's mentioned that the Remainder should be equally distributed between the WIDs, however, the example does not show an equal distribution.

timewaste
8 - Asteroid

Sure, what I mean is... if G1 has 5 WIDs and remainder of 3, the workflow must add 1 each to top 3 records for G1 as shown above, so the final value of sum should be 6 for WIDs 1,2,3 and should remain 5 for WIDs 4 and 5. Similarly for other case G2 as well and so on if others exist.

ponraj
13 - Pulsar

Here is the sample workflow for your case.  Hope this is helpful. 

 

WorkflowWorkflow

smille17
7 - Meteor

Ponraj has a solution that will work for you.

timewaste
8 - Asteroid

@ponraj Thanks a ton! Sorry for 'wasting your time'! :P :D @smille17 (y)

 

 

 

Labels