Jump to content

This topic is 7869 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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?

Posted

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.

This topic is 7869 days old. Please don't post here. Open a new topic instead.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.