Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2749
  • Last Modified:

Crosstab Percentage Crystal reports

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
cjonline
Asked:
cjonline
  • 3
  • 2
  • 2
  • +1
1 Solution
 
jgbreedenCommented:
what are the formulas for calculating the met and nonmet values?
0
 
mlmccCommented:
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
 
cjonlineAuthor Commented:
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
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

 
cjonlineAuthor Commented:
Thanks, I've found another of doing it...

Craig.
0
 
mlmccCommented:
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
 
James0628Commented:
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
 
cjonlineAuthor Commented:
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
 
James0628Commented:
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
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

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.

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