Solved

Crosstab Percentage Crystal reports

Posted on 2009-07-01
8
2,678 Views
Last Modified: 2013-11-15
I have a cross tab report in CR 10 that shows the following data.

APPNAME                   MET    NOT MET     TOTAL
APPLICATION1            10        90            100
APPLICATION2            85        22            107
APPLICATION3            20        40            60

I need to display the percentage below each value.. ie
APPLICATION1  10% 90% 100%

I have selected the "show as a percentage" of option in the crosstab but the percentage never add up to 100% and with some data it shows 0%

I've read that there is a bug in crystal with this function, but have tried using a formula to show percentage but this is not working either.. I can post screen shots if required.

thanks
Craig.
0
Comment
Question by:cjonline
  • 3
  • 2
  • 2
  • +1
8 Comments
 
LVL 5

Expert Comment

by:jgbreeden
ID: 24756392
what are the formulas for calculating the met and nonmet values?
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 24759415
I haven't seen anything that indicates a problem and I have built crosstabs that work that way with no problems.

I agree.  Need to see the formulas and perhaps some sample data.

mlmcc
0
 

Author Comment

by:cjonline
ID: 24761178
Hi,
Here is the formula for MET/NOT MET

if isnull({sp_SAIC_ResponseTime;1.SAIC_CONTACTED}) then 2
else
if (isnull({sp_SAIC_ResponseTime;1.responsetime}) or {sp_SAIC_ResponseTime;1.responsetime} = 0) then
1
else
if {@BusinessMins} <= {sp_SAIC_ResponseTime;1.responsetime} then
1
else
0

I have attached a snapshot of the crosstab, as you can see its only totalling to 99%
also I have attached a screenshot of the crosstab details.
thanks

crosstab1.bmp
crosstab2.bmp
0
 

Accepted Solution

by:
cjonline earned 0 total points
ID: 24764143
Thanks, I've found another of doing it...

Craig.
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 100

Expert Comment

by:mlmcc
ID: 24766080
The problem is that you aren't displaying any decimals in the cross tab.  

For instance in the CRM line the values are
  93       1    5
They probably are really
  93.2    1.4     5.4

mlmcc
0
 
LVL 34

Expert Comment

by:James0628
ID: 24769102
FWIW, I think mlmcc is basically right and the numbers don't appear to add up because you're not seeing the decimal places.  However, there are two additional complications:

 1) CR appears to be truncating the decimals, instead of rounding.  For example, 1 / 17 (last column total on the WEB row) would be 5.88 %, which should clearly round to 6 %, but CR shows 5.

 2) Even if you wanted to show the decimals, you can't.  You can try to change the field format to show decimal places, but CR 10 simply refuses to show them on a count or distinct count that's shown as a % of the total in a cross-tab.  I don't know why, but it won't do it.  When I managed to force it to show decimal places, they were 0, so apparently the values are rounded (or truncated) internally.


 Just out of curiosity, what other way did you find?  It could help someone else in the future with a similar problem.

 James
0
 

Author Comment

by:cjonline
ID: 24770790
Hi,
I created 3 formula's :

- SLAMetCounter

if {@SLA Met} = 1 then
1
else
0

 - SLANotMetCounter
if {@SLA Met} = 0 then
1
else
0

and

- Crosstab%

 if {@SLAMetCounter} > 0
    then {@SLAMetCounter}/DistinctCount ({@Callid})*100
    else
 if {@SLANotMetcounter} > 0
    then {@SLANotMetcounter}/DistinctCount ({@Callid})*100
       else 0


Then I summarized in the crosstab with - Percent of Sum of (@Crosstab%)
This give me the correct percentage with the decimal places and no rounding.

Craig.
0
 
LVL 34

Expert Comment

by:James0628
ID: 24776658
Thanks for sharing.

 I take it that the @SLAMetCounter and @SLANotMetcounter counts occur in separate groups in the cross-tab (the "SLA Met" and "SLA Not Met" columns).  The @Crosstab% formula tries to handle both and I don't see how that could work unless it was only going to have one count or the other each time it was evaluated.

 James
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
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…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

747 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now