Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Comparing Values In Adjacent Rows

Status
Not open for further replies.

Auguy

Programmer
May 1, 2004
1,206
US
I have a table that I have created with a SQL stored procedure that has sales figures in it such as weekly and monthly totals. What I would like to do is compare the sales total in one row with the sales total in the previous row to get the change in sales and/or a percentage difference. Can this be done in the report, or am I going to have to do some other pre-processing first?


Auguy
Northwest Ohio
 
There is a "previous" function that returns the data for the previous row, so could potentially be used for what you're trying to achieve
 
Thanks, I will check it out.

Auguy
Northwest Ohio
 
It looks like that is exactly what I was looking for. I guess I need to go back and do some more reading on all of the features.

Thanks Again.

Auguy
Northwest Ohio
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top