Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Calculating the Percentage of Two Summed Fields

Posted on 2011-03-21
8
Medium Priority
?
604 Views
Last Modified: 2012-05-11
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
Comment
Question by:rporter45
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
  • +1
8 Comments
 
LVL 4

Expert Comment

by:joeyw
ID: 35180715

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
 
LVL 26

Expert Comment

by:Kurt Reinhardt
ID: 35180941
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
 

Author Comment

by:rporter45
ID: 35181623
Sorry - I am still a little foggy but have included a better screen shot to display.  thank you, Full View
0
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
LVL 101

Accepted Solution

by:
mlmcc earned 1000 total points
ID: 35181818
Sum({@Cash},{group1field}) / Sum({@Pledge},{Group1Field}) *100

mlmcc
0
 

Author Closing Comment

by:rporter45
ID: 35182018
Very easy to follow
0
 

Author Comment

by:rporter45
ID: 35182031
Comment provided by mlmcc explained what I needed to know with reference to my understanding of Crystal.  Thank you very much
0
 
LVL 26

Expert Comment

by:Kurt Reinhardt
ID: 35182032
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
 
LVL 101

Expert Comment

by:mlmcc
ID: 35184313
I really think this should be a split.  My comment was simply to provide assistance to the original comment.

mlmcc
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…

718 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question