Join the Alteryx Community’s Maveryx Summer Cup event! Compete, network with others, and earn your gold through a series of challenges from July 24th to August 11th. Learn more about the event here.
alteryx Community

# Alteryx Server Discussions

SOLVED

## Help with formula that involves several steps of calculation

7 - Meteor

Hey there!

I have 3 rows of data.

First one is time - let´s say I am interested in a 5 years time frame.

Second and third are variables - X and Y

=> =>=> Data looks like =>=>=>

Period      X         Y

1              0.9       1.1

2              0.5        1

3              2           1.3

4              4           0.3

5              2.2        2.1

Calculation for the year one is prety simple.  Ijust need to summarize values  X*Y for all periods (1-5) =>(0,9*1.1)+(0.5*1)+(2*1.3)+(4*0,3)+(2.2*21).

Here comes the tricky part.

In period 2 I want to skip value of X in period 1 and value of Y for period 5. Calculation should looks like => (0,5*1,1)+(2*1)+(4*1,3)+(2,2*0,3)

In period 3 I want to skip values of X for periods 1 and 2 and values of Y for periods 4 and 5. Calculation should looks like => (2*1.1)+(4*1)+(2*1,3)

Thanks and cheers!