Papabjoe Posted July 18, 2003 Posted July 18, 2003 I believe this is a calculation problem. The data looks like this; Each record has three fields <State> <Miles> <Gallons> We process fuel taxes for truckers and must create a report that totals the amount of miles traveled and gallons of fuel purchased in each state. We will enter Data that looks like; <AZ> <151> <200> <CA> <132> < > <NV> <115> < > <AZ> <100> < > <NM> <200> <150> etc... I need a field that will total miles by state, and another field that will total the gallons purchased by state. Any one have any suggestions?
ernst Posted July 18, 2003 Posted July 18, 2003 Hi Papa, You can do this by defining a self-join relation to the file with the 'state' field on both sides of the relation. Assuming you call this relation 'Self', you could define the calculation fields as follows: TotalMiles = Sum(Self::Miles) TotalGallons = Sum(Self::Gallons) Regards, Ernst.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now