• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 616
  • Last Modified:

Calculating the Percentage of Two Summed Fields

Hi there,

I have two different fields, amount pledged and amount paid.  Each field is summed to represent two different totals in my report (please see the attached) What I need to do is calculate the percent UNPAID which is essentially Total Amount Pledged/Total Amount Paid *100 but receive a division by zero error because I am not dividing the summed totals.  I can't figure out how to do this - any help would be greatly appreciated as this is the very last component of my report,

Thank you - Field View Field View
0
rporter45
Asked:
rporter45
  • 3
  • 2
  • 2
  • +1
1 Solution
 
joeywCommented:

In the formula editor, be sure to choose the sum fields for the appropriate group or report level.  If you are looking at placing this in group level one, find the sum fields for pledge and gl balance for group level one.  If you are looking at doing this at the report level, find the sum fields that say report level.
0
 
Kurt ReinhardtSr. Business Intelligence Consultant/ArchitectCommented:
Generally, the way to get around this is to account for it in a formula:

If
  Total Amount Paid = 0
Then
  0
else
  Total Amount Pleged % Total Amount Paid

Open in new window


As joeyw says, in your formula editor, make sure you choose the right summary values.

~Kurt
0
 
rporter45Author Commented:
Sorry - I am still a little foggy but have included a better screen shot to display.  thank you, Full View
0
Cloud Class® Course: C++ 11 Fundamentals

This course will introduce you to C++ 11 and teach you about syntax fundamentals.

 
mlmccCommented:
Sum({@Cash},{group1field}) / Sum({@Pledge},{Group1Field}) *100

mlmcc
0
 
rporter45Author Commented:
Very easy to follow
0
 
rporter45Author Commented:
Comment provided by mlmcc explained what I needed to know with reference to my understanding of Crystal.  Thank you very much
0
 
Kurt ReinhardtSr. Business Intelligence Consultant/ArchitectCommented:
FYI, if you use hte % operator, you don't need to do the / and *100.  

You will still need to account for division by zero using logic, such as in the example above.

~Kurt
0
 
mlmccCommented:
I really think this should be a split.  My comment was simply to provide assistance to the original comment.

mlmcc
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Microsoft Office 2010

This course will introduce you to the interfaces and features of Microsoft Office 2010 Word, Excel, PowerPoint, Outlook, and Access. You will learn about the features that are shared between all products in the Office suite, as well as the new features that are product specific.

  • 3
  • 2
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now