If I understand your objective correctly, here's what I consider the clearest way to do it. First, I think it'll be easiest if you restructure your data into a table that has three columns: State, Year, and GSP. So it would look like this: State Year GSP ===== ==== === AK 1960 123456 ... FL 1972 234567 ... WY 2012 345678 Assuming 50 states and 53 years, this table will have 2650 records. Now in Enterprise Guide, the trick is to create a table with your current GSP and the one from the year before. To do this (assuming your table is named StateData, to ensure we don't confuse the table and the column): 1. Start a new QueryBuilder dialog on StateData. 2. Click Add Tables, and add StateData a second time. It will be referred to as t2, and your original StateData will be t1. They are actually both the same table. This is a little unusual, but completely legitimate. 3. Click Join Tables. In this dialogue: 3a. Make sure t1 is joined to t2 on State with an inner join. 3b. Right click the Join symbol, and click Properties. 3c. In the Properties window, click Edit... to create a filter for the join. 3d. In the filter, use the icons or type in the filter value to be t2.year = t1.year - 1. 3e. Close the Tables and Joins dialoge. 4. On your main query dialogue, select all of the values of t1, and select t2.GSP, renaming it t2.Yr1GSP. 5. Create a new advanced expression, call it Yr1GSPChg, and set it equal to t1.GSP - t2.GSP. When you run this, it should give you your one year time series. If I were you, I'd add the State and Year from t2 to the results temporarily, and see if everything looks good. This approach works the same for the 5 and 10 year differences. One of the things you'll need to do it figure out what to do about the years that don't have a -1, -5, or -10 year value. There are a number of different approaches you can use. Good luck! Tom
... View more