Print Page | Close Window

Percentage per group

Printed From: Crystal Reports Book
Category: Crystal Reports for Visual Studio 2005 and Newer
Forum Name: Report Design
Forum Discription: The best way to design a report and problems you have encountered
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=21458
Printed Date: 29 Apr 2024 at 5:19pm


Topic: Percentage per group
Posted By: victoria61485
Subject: Percentage per group
Date Posted: 03 May 2015 at 4:39am
Hello,

I have a report that has one group. In this group are two summary fields that show the sum per group of Total Tickets and another that shows the sum per group of Tickets Closed. The closed tickets are a percent of the total tickets and I would like to show what percent the tickets closed are of the total. How can I show this at the group level? Thank you for any help!



Replies:
Posted By: hilfy
Date Posted: 12 Jun 2015 at 4:24am
If you don't already have an answer for this, try something like this:

if sum({total tickets}, {group1 field}) > 0 then
sum({closed tickets}, {group1 field})/sum({total tickets}, {group1 field}) * 100
else 0

This will prevent "divide by zero" errors and give you the percentage you're looking for.

-Dell

-------------
Proviti, Data & Analytics Practice
http://www.protiviti.com/US-en/data-management-advanced-analytics - www.protiviti.com/US-en/data-management-advanced-analytics



Print Page | Close Window