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.

Calculating Across Records

Featured Replies

  • Newbies

I need an elegant solution for appending sequential serial numbers to parent file ids in a child file. Scenario: I am trying to calculate investment performance for multiple investment portfolios. I have two files: a portfolios.fp5 (parent) and a performance.fp5 (child). The performance file keeps monthly performance data and has cumultive performance calculations, requiring me to use a self-join so that I can use data from previous records (ie., 1 month back, 6 months back, 120 months back, etc.). This is no problem really. The problem arises when I attempt try to track more than one portfolio in the file.

I can track the performance of one portfolio in one file and calculate cumulative and average annual performance by geometrically linking previous records' monthly performance. I go back 120+ records; however, sequential serial numbers are critical to the problem. Alternatively, since the performance records all have month end dates (report_date), I could also link records by using Date(Month(report_date), 1, Year(report_date) ) -1.

Either way, the problem occurs when I reference another portfolio in the performance file, then my sequential numbering gets screwed up.

I suppose I'd like my performance file to serializes itself using the portfolio_id from a separate portfolio file. For instance:

Portfolio_ID & NumToText(Serial)

But it must be in sequential order so that the performance calculations work. Again, a solution with a date might help too. Please, someone, help. Thanks.

confused.gif

Not sure I followed all that, but my quick guess is this:

When you move from one portfolio to many, your self-join on that file needs to include the portfolio ID as part of the match in the self-join... you only want to join with the relevant (same portfolio) records.

Well, maybe that tidbit will be helpful.

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.