Free Trial

Alteryx Designer Desktop Discussions

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

Calculate returns across multiple rows and columns

student123
5 - Atom

I have a dataset with multiple firms and their stock prices on certain dates. I want to create the returns of these stocks across the rows and for all the firms (across columns). My goal is to have the same table as here, only with the returns on the corresponding days and not the stock prices.

 

 

image.png

4 REPLIES 4
binuacs
21 - Polaris

@student123 can you provide a sample input file and expected output for better understanding?

student123
5 - Atom

My aim is to calculate the return across all rows and columns. So the return for MARKET from 02.01 to 03.01 and so on and the same for the firm with the ID 4122605 and so on.

 

Input      
DATEMARKET41226054128969449285042505884967971
02.01.182695.8143.9023.2147.84NA2.50
03.01.182713.0644.4722.1948.21NA2.58
04.01.182723.9944.3222.4748.52NA2.74
05.01.182743.1544.8622.8149.78NA2.73
       
OutputMARKET41226054128969449285042505884967971
02.01.18NANANANANANA
03.01.180.00640.0130-0.04390.0077#VALUE!0.0320
04.01.180.0040-0.00350.01260.0064#VALUE!0.0620
05.01.180.00700.01220.01510.0260#VALUE!-0.0036
Yoshiro_Fujimori
15 - Aurora

Hi @student123 ,

 

The rounding result is a little different from yours.

You may want to modify the expression in Multi-Row Formula tool if necessary.

I hope this helps.

 

Workflow

1271904_Workflow.png

 

Input

DATEMARKET41226054128969449285042505884967971
02.01.182695.8143.923.2147.84NA2.5
03.01.182713.0644.4722.1948.21NA2.58
04.01.182723.9944.3222.4748.52NA2.74
05.01.182743.1544.8622.8149.78NA2.73

 

Output

DateMARKET41226054128969425058844928504967971
2018-02-01      
2018-03-010.00640.013-0.0439 0.00770.032
2018-04-010.004-0.00340.0126 0.00640.062
2018-05-010.0070.01220.0151 0.026-0.0036
student123
5 - Atom

Thank you!

Labels
Top Solution Authors