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.

Correct syntax for calculating an average in a Sub Summary report.

Featured Replies

  • Newbies

Hi

I just need some help with the correct syntax for calculating an average in a Sub Summary report.

I have a database with share parcels in it & each of my companies holdings in other companies are recorded there. Now I'm reasonably used to Summary & Grand Summary Totals in an FM report and for me they have usually been a mere Total or Sub Total of a figure but I am having difficulty in getting an average price to appear correctly in a Sub Total.

The Grand Total Average 'share price' appears correctly in my reports but no matter what syntax I try I can't get it to appear correctly in the Sub Total. The field 'AverageEntryPrice' is derived by Type: Calculation. Unstored,=Bvalue Total/Total Held.

This works well in the Total part of the report but whatever I try in the Sub Total section I can't get it to appear correctly. Currently in the Sub Total section I have "Sub Tot Avge Entry Price" Type: Summary Options: Total of AverageEntryPrice (running with restart), when sorted by Invest Converted::BO.

So I thought this should give me the average price that each of my companies pays for shares in other companies but it does not work. Of course if I do a report for each of my companies individually I can get the Avge price for that companies holdings as it appears in the Grand Total section but it would be good to get all 3 companies in the one report.

Has anyone go any suggestions.

 

Your question is unclear - mainly because we don't know what data you have to begin with. So this part:

16 minutes ago, Twizzle said:

The field 'AverageEntryPrice' is derived by Type: Calculation. Unstored,=Bvalue Total/Total Held.

is meaningless because we don't know what Bvalue Total and Total Held are. If these are summary fields, and you want to divide their sub-summary values for each company, then you need to use =

GetSummary ( Bvalue Total ; Company ) / GetSummary ( Total Held ; Company )

where Company is the breakfield in your report. But this is just a guess.


 

  • Author
  • Newbies
1 hour ago, comment said:

Your question is unclear - mainly because we don't know what data you have to begin with. So this part:

is meaningless because we don't know what Bvalue Total and Total Held are. If these are summary fields, and you want to divide their sub-summary values for each company, then you need to use =


GetSummary ( Bvalue Total ; Company ) / GetSummary ( Total Held ; Company )

where Company is the breakfield in your report. But this is just a guess.

 

1 hour ago, comment said:

Thank you comment your 'guess' was correct & I am very grateful

.
 

 

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.