Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Invoices for a year,but how do i get quartertotals

Featured Replies

  • Newbies

Hey,

I made an invoice/timebilling thing in FMP.

I'd like to have quarter subtotals. How do i do that?

Thanks

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.

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

Case(

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.

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

or

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.

Very nice, comment. I knew someone would do it. Now I just need someone to pay off on my bet. grin.gif

BTW, what does "these other folks" mean? I trust this is something good?

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.

See, now you've made me blush. blush.gif

As for decompiling my brain - forget it.

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.