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.

Sorting by sub-summary calculation field

Featured Replies

I have an FMP solution for tracking productivity in a manufacturing environment.  I gather quantity of parts produced, as well as quantity of parts expected (over time) in a database.  I have several reports that summarize the data based on employee, job ID, etc.  

 

One of the reports includes the below calculation field to calculate performance as a percentage.

 

 

Truncate(
 
(GetSummary ( summary of actual parts ; _kf_operation_no )/GetSummary ( summary of expected parts ; _kf_operation_no ))*100;2)
 
I would like to sort the report in descending order, based on this field, but cannot.  Any ideas?
 
Thanks,
 
Bill

Hi, Bill:

 

I assume the GetSummary calc is displaying the correct value, and that the question is only about how to sort by actual part produced by the summary count field "summary of actual parts"?

 

If so, you may not only find it simpler, but it may also sort results faster (like NASCAR fast vs. a tortoise!) if you just sort by the numerator summary field:

summary_field-sort.png

 

On another note, you may also find it easier to use a Let statement, like the one below for calculating the percentage values:

Let (
[ actual = GetSummary ( summary of actual parts ;  kf_operation_no ) ; expected = GetSummary ( summary of expected parts ; kf_operation_no ) ];
Round ( ( actual/expected ); 5 ) //or, maybe even Truncate ( ( actual/expected ); 2 )
)

You'll need to format the field in Layout mode using the Inspector and set it for percentage, along with the precision you desire to be displayed.

 

You may also want to consider that field and table names that begin with underscores "_" will cause you problems if you every try to use SQL in your solution (I removed them from the "kf_operation_no" fields in the example above).

 
I'd love to hear back on how this works out for you, so please post a reply!
 
Best regards,
- - Scott
  • 3 weeks later...

Hey, Mr. Bill…

 

Did you ever return to read responses to your original posted question? If so, could you let us know how things worked out for you?

 

Best regards,

- - Scott

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.