July 18, 200322 yr 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?
July 18, 200322 yr 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.
Create an account or sign in to comment