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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

date range help

Status
Not open for further replies.

HOMMER

Technical User
Apr 12, 2001
112
US
I want the information on my report to look like this list. What I cannot do is I want to have 2001 one the right side and the 2002 on the left side. Then give a percent change between the two numbers. I can do so code just can not get started....

Reason Sum Of time down Percent diff
2001 2002

Neck Flashing Not Trimming 9875 11230 97%
Baggers 500005 601512 80%
Out Of Material 2102 4000 97%
Grinder 213 250 76%
blow Mold Electrical 35001 34000 87%
 
It would help if you provide some idea of your table structure. You can create a query that groups by [Reason] and Sums
DT2001:Val(IIf(Year([DateField])= 2001,[DT],0))
and
DT2002:Val(IIf(Year([DateField])= 2002,[DT],0))
In your report, you can calculate your percent diff.
 
I think if you answer the question about how your table(s) are structured, someone can provide a good solution without sending files.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top