3 Replies Latest reply on Oct 6, 2017 12:25 AM by Neil Lord

# Calculate lagged values between two sets of data

Hi, trying to solve this equation that I use in Excel in Tableau to calculate a  3 month average of one set of values and then lagged 3 months against another set of values.  The excel formula is

 =SUM(L3:N3)/SUM(I2:K2)

Attaching a sample of what I'm looking for.  Thanks for the help.

• ###### 1. Re: Calculate lagged values between two sets of data

Hi Fran,

• ###### 2. Re: Calculate lagged values between two sets of data

Neil,

Thanks for the solution.  While it wasn’t exactly what I was looking for we were able to get where we needed.  After examining your formulas we realized we were very close.   We calculated it using your method and we added an Index, but later discovered it was even more simple than that:

Window_sum(sum(, -5, -3)

This formula worked perfectly.

Thanks again for the quick response!

Fran

• ###### 3. Re: Calculate lagged values between two sets of data

Great! I'm glad you found the answer!

Would you mind marking an answer as correct so it closes the thread?

1 of 1 people found this helpful