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.

Featured Replies

Is it possible to have a summary field that is the total of a calculation field that uses GetSummary?

I am running a sub-summary report that finds all line items in a date range and sorts them by employee name. The fields are:

num_Hours_Worked

summary_Total_Hours_Worked

calc_num_Overtime_Hours =

If ( (GetSummary ( summary_Total_Hours_Worked; text_Name_Full )- 40 ) > 0 ; GetSummary ( summary_Total_Hours_Worked; text_Name_Full ) - 40 ; "")

I then have a summary field summary_Total_Overtime_Hours.

The sub-summary report, sorted by text_Name_Full correctly totals the overtime hours for all of the line items in the date range for each employee. The problem is the summary_Total_Overtime_Hours in the Grand Trailing Summary at the bottom. It wildly inflates the actual total of overtime hours across all employees.

Am I missing something, or is it just not possible to summarize a calculation based on a summary?

Thanks!

You should divide the overtime by the count of records of each employee. That way the grand total will even out.

  • Author

Aha! Since my report has no body, only a sub-summary part, the calc that uses the GetSummary function only appears once, but it actually exists for each record in the found set, so that if there are 4 line items for an employee, the calc is added 4 times in the grand trailing summary.

There doesn't appear to be a function returning a boolean for whether or not a record is in the current found set. Is there? That would make things much simpler: a count where InFoundSet=1 and fk_EmployeeID=fk_EmployeeID.

Is there an easy way to figure out how many records are in the found set with fk_EmployeeID=fk_EmployeeID?

it actually exists for each record in the found set, so that if there are 4 line items for an employee, the calc is added 4 times in the grand trailing summary.

Exactly.

Is there an easy way to figure out how many records are in the found set with fk_EmployeeID=fk_EmployeeID?

GetSummary ( sCount ; fk_EmployeeID )

where sCount is a summary field counting any field that cannot be empty, e.g. the serial ID.

--

BTW, using EmployeeID instead of the name is a smart move.

  • Author

Beautiful, perfect. Thank you! And just for posterity, I had a discrepancy with the grand summary calculation being off by $0.01 because of the differences in rounding, so I had it operate on Round (hours; 2)/ # of line items so that it comes out to the same as what you get if you actually add the column.

Thanks for the help!

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.