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

Is it possible to convert the following SUMPRODUCT formula in Alteryx?

akinch001
5 - Atom

[EDITED]

 

Hi Alteryx Community,

 

I would like to create a workflow that computes each investors' monthly returns. (GAV-Prior month GAV)/Prior month GAV but using an array

 

akinch001_0-1630643347037.png

 

The formula I am using in Column D is:

 

=(SUMPRODUCT(--($C:$C=$C2),--($A:$A=EOMONTH($A2,0)),$B:$B)-SUMPRODUCT(--($C:$C=$C2),--($A:$A=EOMONTH($A2,-1)),$B:$B))/SUMPRODUCT(--($C:$C=$C2),--($A:$A=EOMONTH($A2,-1)),$B:$B)

 

Is it possible for this work in Alteryx?!

 

Thanks in advance.

4 REPLIES 4
cmcclellan
14 - Magnetar

Is Col D the same as Monthly Return ?
Can you attach the spreadsheet so we have some data to use ?

akinch001
5 - Atom

Yes, sorry Col D = Monthly Return.  Please see edited post with data attached.   

 

Thanks!

cmcclellan
14 - Magnetar

Simple, use a Multi-Row Tool ... 

 

cmcclellan_0-1630644166178.png

 

 

The important settings are ...

- Make the new column a float (or double)

- Group By Investor ID

 

akinch001
5 - Atom

Thank you for the solution!

 

Only thing I would add to improve this solution is a Sort tool so that your input data does not need to be in date order beforehand.

Labels
Top Solution Authors