Jump to content

Getting the sum of all orders this year


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

Recommended Posts

Hi peeps

Quick question

I have a date field. Basically I want a Calculation field to look at the date field and add up all dates that have 2002 in it. Therefore if there are 3 dates that contain ??/??/2002, the calculation field will add up to 3.

Hope that's a good enough description smile.gif" border="0

Thanxs

Steve Griff

Link to comment
Share on other sites

I'm going to assume that you REALLY don't want this to work only for 2002. First create a calculation field:

CalcYear (calculation, number) = Year(DateField)

Then a global field:

gYear (global, number)

Create a relationship matching gYear <--> CalcYear

Then add up the related records:

Count (calculation, number) = Count(YourNewRelationship::Year)

You can really do this with two fields for just 2002, but it is good practice to change DATA and not STRUCTURE to alter the calculation for 2003.

-bd

Link to comment
Share on other sites

This topic is 7224 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
 Share

×
×
  • Create New...

Important Information

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