A
Andreas
Hi all,
I have a table which contains two columns. The first is a date column,
the second contains numerical values. I need to create a query that
gives me the percentage change from the previous row to the current
row in a third column. Here's an example:
Original table:
Date Value
2009-10-11 100
2009-11-30 105
2009-12-03 115
2009-12-23 110
....
Needed result for query:
Date Value %-Change
2009-10-11 100 0.00%
2009-11-30 105 5.00% (=105/100-1)
2009-12-03 115 9.52% (=115/105-1)
2009-12-23 110 -4,35% (=110/115-1)
....
How can I calculate the percentage change within the query?
Regards,
Andreas
I have a table which contains two columns. The first is a date column,
the second contains numerical values. I need to create a query that
gives me the percentage change from the previous row to the current
row in a third column. Here's an example:
Original table:
Date Value
2009-10-11 100
2009-11-30 105
2009-12-03 115
2009-12-23 110
....
Needed result for query:
Date Value %-Change
2009-10-11 100 0.00%
2009-11-30 105 5.00% (=105/100-1)
2009-12-03 115 9.52% (=115/105-1)
2009-12-23 110 -4,35% (=110/115-1)
....
How can I calculate the percentage change within the query?
Regards,
Andreas