Jump to content
Server Maintenance This Week. ×

Counting Subsummary Occurrences


This topic is 7031 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Calculations involving GetSummary are useful for displaying summary information in a body part or using summary information in another calc. If you are using subsummaries, which it sounds as if you are, then you should only need to use a summary field based on the 'count of' your hospital ID field and put this in all your subsummary parts and Grand Summary part.

Link to comment
Share on other sites

  • Newbies

Thanks for the reply. I'm new at posting, so maybe I didn't give the right info...

I guess I should have said that I created a weighted subsummary using four fields that:

1. count the 'hospitals' (each record is associated with one hospital);

2. shows the total in the found set;

3. calculates the numerical weight of each record; and

4. a summary field that totals the weighted records (or how many unique hospitals were visited)

This summary field works for the subsummary parts, but does not return the correct result in the grand summary on all occasions. Perhaps there is a better way???

Link to comment
Share on other sites

Hi jerilynch,

Welcome to the Forum. This should be a subject since it has nothing to do with counting subsummarrry occurrences. You need a field Year = Year (Sale Date). Set up you report to group by year. Sort based on year and enter preview mode and you should get the results you want.

Link to comment
Share on other sites

I assume that your weighted value is 1 / Count of visits to a hospital. Let's say you have a summary field Visits which is a count of HospitalID. Then the weight is 1/GetSummary (Visit; HospitalID).

The number of hospials visited is the sum of the weights which will not be an integar because of rounding errors. Assuming that you have Summary field, No Hospitals, that totals the weight you can get a clean number by using Round (GetSummary (No Hospitals; No Hospitals); 0). You could use the ceiling function in place of round.

Link to comment
Share on other sites

This topic is 7031 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.