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.

Calculate percent change between values in sequential portal rows

Featured Replies

I have an Employee Records database, with contains a related table of wage history contained within a portal, which is sorted by date.

Employee - John Doe

Date           Description           Wage         %Change

1/1/2021     Annual Raise        $20.00

1/1/2020    Original Rate        $18.00

I'm trying to create a calculation, which will display the percent difference between the data in the subject portal, and the next portal record in the sequence.  I've created the below calculation, but the results are out of sequence and/or inaccurate.  It appears that my formula is not grabbing the proper values??

 

Let ( Salary1=GetNthRecord ( Wage ; Get (  RecordNumber ) ); Let ( Salary2=GetNthRecord ( Wage ; Get ( RecordNumber ) +1 ); Case(Salary2="";0; (Salary1/Salary2)-1   )))

I think the calculation could be simply = 

Wage / GetNthRecord ( Wage ; Get (RecordNumber) + 1 ) - 1

This needs to be unstored and formatted as percent. It will produce an error on the last portal row; the simplest solution, IMHO, is to hide the field when

Self = "?"

 

  • Author

Thanks.  Both calculations works...it was the "un-stored", that was needed to get things to work, correctly.

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.