Jump to content

Invoices for a year,but how do i get quartertotals


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

Recommended Posts

You could create a calc. field that uses the date field to assign an invoice to a particular quarter. Once you have a field that categorizes records by quarter, you can make a standard subsummary report where the quarter field is the break field. You still need to define a summary field that is the total of the invoices. You can use the new layout/report wizard to make the subsummary report at that point if you don't want to add the layout parts yourself.

Link to comment
Share on other sites

Here's a quick and dirty calculation that will give you the quarter and year field that you can do finds and sorts on:


Month(Date) = 1 or Month(Date) = 2 or Month(Date) = 3,1,

Month(Date) = 4 or Month(Date) = 5 or Month(Date) = 6,2,

Month(Date) = 7 or Month(Date) = 8 or Month(Date) = 9,3,

Month(Date) = 10 or Month(Date) = 11 or Month(Date) = 12,4) & Right(Year(Date),2)

...I would bet one of these other folks could come up with a shorter, more elegant calculation.

Link to comment
Share on other sites

You win your bet.

Quarter =

Int ( ( Month ( Date ) - 1 ) / 3 )

This yields the numbers 0, 1, 2 or 3, so if you want the correct label, add 1 to the result:

Int ( ( Month ( Date ) - 1 ) / 3 ) + 1


Int ( ( Month ( Date ) + 2 ) / 3 )

In v.7, use Div() instead of Int ( x/y ).

For correct sorting, I would place the year before the quarter, and use the full 4 digits.

Link to comment
Share on other sites

One thing I have learned in all my years of computer programming - no matter how much you think you know, there is always someone, somewhere, that knows more than you do. an old UNIX instructor I once had told me that. He also said to find those folks and decompile their brains. If you don't learn something new every day, you're not doing it right.

That's who "these other folks" are, including you, comment. I learned something new from you.

Link to comment
Share on other sites

This topic is 6608 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.