Alteryx Designer Desktop Discussions

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

Formula Tool to Populate Columns by Splitting an amount across columns using a limit

Siharmer
6 - Meteoroid

Hi Everyone,

 

Relatively new to Alteryx so please go easy! Just thought I'd see if someone here can help me with trying to populate 5 columns based on the value of a field.

 

Essentially I have a total amount eg. 600 and I want to split this over 5 columns (Week 1, Week 2,  Week 3,  Week 4,  Carry Over) starting at Week 1 and moving to week 5. However the maximum amount each week (Weeks 1-4) can only be 150 and it should fill the columns starting with Week 1. Anything left over would go into Carry Over.

 

I have included below what the output would look like (in the attached excel), any ideas how I achieve this? I have tried using IF statements but can't get the logic to work properly (I end up with negative values in some of the columns)?

 

Any help would be greatly appreciated!

 

Simon

7 REPLIES 7
Qiu
20 - Arcturus
20 - Arcturus

@Siharmer 
It turns out to be a very interesting one, though I am not quite happy with my flow, but I think it will work.

Maybe we can submit this as a weekly challenge idea?

0118-Siharmer.png

Siharmer
6 - Meteoroid

 Thanks Qiu, that worked perfectly!

Qiu
20 - Arcturus
20 - Arcturus

@Siharmer 
Glad to help.
Can I submit this one as weekly challenge idea?

Siharmer
6 - Meteoroid

Yep, no problem 😁

Qiu
20 - Arcturus
20 - Arcturus

Great!

flying008
14 - Magnetar

Hi, @Siharmer 

 

Another way like @Qiu  for you :

 

录制_2024_01_18_16_43_59_411.gif

Siharmer
6 - Meteoroid

Thanks @flying008 ... also works perfectly!

Labels