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.
cjonlineAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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
Become a Certified Penetration Testing Engineer

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

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

Craig.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
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
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
DB Reporting Tools

From novice to tech pro — start learning today.