Salesforce and other SMB Solutions are coming soon. ×

# Calculation Problem

## Recommended Posts

This is driving me crazy. I am trying to sum the results of 3 Calculations and continue to get the wrong results. the Calculations return a 1 if certain criteria is met and alll I am trying to do is sum the 3 different results.

i.e. Result A = 1, Result B = 2, and result C = 2 then the total would be 5.

The Results A-C display as in a Sub Summary Report Part and the Total would also.

Any help would be appreciated. This should be very easy so I must be missing something very simple.

greg

##### Share on other sites

Greg,

I'm not sure I understand. Are the Results A - C summary fields or calculation fields? Are they in a sub summary part? Is the Total also in a sub summary part or a Grand summary part. Is this a calculation field or summary field?

Can you post an example file?

##### Share on other sites

Okay Now I'm having a Calculation problem and I think it's a simular issue. See attached example file. The On Time Percentage is combining all records and not just the sub summaries.. What I'm looking for is on time by customer for Customer 1 it should be 66.66% and for customer 2 it should be 50%, but instead I'm getting 60%

##### Share on other sites

Hi blevey,

You're correct that gwent (greg) did not explain his problem clearly enough for us to be able to propose a solution. It seems likely that he simply needs to place a copy of the existing summary field into a Trailing Grand Summary part to get the desired effect - however that's just a guess, because we don't have much to go on here.

In the meantime, I've taken a quick look at the file you posted. The issue in your case is that the calculation you are using is referencing the summary field directly - which means it retrieves an overall summary value (ie across all records in the found set) regardless of how the found set is sorted and whether it is appearing in a sub-summary part.

To get the calculation to retrieve the summary values context-sensitively (ie with respect to a defined sub-summary and sort sequence) you will have to specify a break field for each reference to the summary field. This is done using the GetSummary( ) function.

I am attaching a modified copy of your file in which GetSummary( ) is used appropriately and you will see that the On Time Percentage field value is now evaluating separately (and correctly) for each customer.

Meanwhile, I also slightly simplified the syntax of the formula you were using for the On Time calculation field.

##### Share on other sites

Ray,

I cannot thank you enough.... I never would have found that.. thanks again.

BLevey

##### Share on other sites

Hey Guys sorry for the delay getting back to you.

Attached is a sample zipped file I created to try and explain what I need. What I am trying to get is the Total Number of Instances Marination exceeds 3 days. This would be the a Total of all 3 Marinated Products.

I tried using the get summary function but I am still doing something wrong.

greg

##### Share on other sites

Well thank to the help form Ray on my issue, I was able to fix yours.

I had to make some changes but here's the fixed file. I believe the break field has to be on the same table, so I added the Field: Rest Name as a calculation = Restaurants::restaurant_name and changed the subsummaries. I wish I could explain it better, but here's the fix.

Blevey

##### Share on other sites

Thanks, I'll give it a try

greg

## Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

×   Pasted as rich text.   Paste as plain text instead

Only 75 emoji are allowed.

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×

• ### Images

• 0
By Soliant Consulting,
• 0
By Soliant Consulting,
• 0
By Soliant Consulting,
• ### Forum Statistics

• Total Topics
33.6k
• Total Posts
141.4k
×
×
• Create New...