We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Dynamic Multi-Row Formula

mjh418
8 - Asteroid

Hi All, 

I need help with making a dynamic multi-row formula. 

Calculation itself is a simple compounding. Where N is the first value(row), [(1+Value(n))*(1+Value(n+1))*(1+Value(n+2))]-1...so on. It is actually equivalent of =FVSCHEDULE(1,Value(n),Value(n+1),...)-1 in EXCEL which also seems to exist in Alteryx as FinanceFVSchedule.

The tricky part is that the period (number of rows) is not fixed. It can vary on the workflow outcome. So maybe its 6 rows sometimes, or maybe its 12 rows sometimes. 

If someone can help me with a formula/method to calculate compounding of changeable number of values(rows)

 

TypeValueDESIRED/EXPECTED OUTCOME
A-0.00419-0.004193025
A-0.09329-0.097093214
A-0.1191-0.204630879
A0.101437-0.12395137
A0.036945-0.091586132
A0.022284-0.071342618

example:

First outcome:  -0.00419 +1 = -0.995806975 -1 = -0.004193025

Second outcome: (1+-0.00419)*(1+0.09329) -> (0.995806975 * 0.906708638)-1 = -0.09709

 

The Main issue is that the number of rows(periods) will change, so it needs to be dynamic. I can't just hard-code rows or fields.

Calculation itself isn't very important here. I just need to know how to have a multi-row or multi-column formula that will work dynamically even if the number of rows or columns change.

If there is way to do this by column instead of rows, that's even better.

 

Thank you so much for your time.

 

 

25 REPLIES 25
mjh418
8 - Asteroid

Wow seems complex, I will surely take look at them as I need to use user inputs enabled customization later. Thank you so much.
Sorry one very last question for this one! Is it possible to use the RECORDID or something similar, where it will start with 1 WITHIN the the same KEY?
For example, instead of just 1 to 20 consecutively down the column, can I make it populate this way below? it resets from 1 when it is encounters a different KEY. 

KeyRecordID
A1
A2
B1
C1
C2
C3
mceleavey
17 - Castor
17 - Castor

@mjh418 ,

 

that's what the grouped recordID tool does:

 

mceleavey_0-1623843019208.png

 

mceleavey_1-1623843037661.png

 

 

M.

 

 

 



Bulien

mjh418
8 - Asteroid

Unfortunately im using Alteryx 2020.03 and i dont think i have or can use/import this tool..:(

mceleavey
17 - Castor
17 - Castor

@mjh418 ,

 

I've amended the XML to your version. Try it now.

 

M.



Bulien

mjh418
8 - Asteroid

Amazing!! 

I don't know how I can thank you enough!
Really saved me a lot of headache and time. Thank you so very much @mceleavey. Wish there was more I can do than just click on Like hahah.

 

Thank you once again!

 

mceleavey
17 - Castor
17 - Castor

no problem.gif

 

You could mark the Grouped RecordID as a solution as well, that might help others following the feed.

 

Happy Alteryxing!

 

M.



Bulien

Labels
Top Solution Authors