Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Bar Chart Percentage 1

Status
Not open for further replies.

mtownbound

Technical User
Jan 28, 2002
293
US
Should be easy....I have a bar chart that's totaling the number of tickets by month and I set the Summary Option to perform it as a "percentage of" and the number is perfect. However when I change the number format to %, it basically multiplies it by 100.

Example....The month of July is showing as 32 (which is correct), but when I change the number type, it's now 3,178%.

What am I missing???
 



hi,

1 is 100%
.32 is 32 %

therefore

32 is 3200%

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Skip, I think there's a disconnect....I don't have .32%, I have 32%, but instead of being displayed as 32%, it's 3,200%.
 
mtownbound,

I think Skip's point most likely valid. Seems to coincidental you are seeing 3200% for 32 and it not be related to his point. [smile]

Can you please provide more detail surrounding the nature of the field (and the type of summary) you are summarizing as well as what field is it set "as a percentage of". One of these two elements is most liekly causing an outage by a factor of 100 (curiously the math one would need in converting to a percent).

If you could provide the above detail, it should be easier to dissect what it is which is causing the anomoly.

Cheers!

Mike
---------------------------------------------------------------
"To be alive is to revel in the moments, in the sunrise and the sunset, in the sudden and brief episodes of love and adventure,
in the hours of companionship. It is, most of all, to never be paralyzed by your fears of a future that no one can foretell."
 
Well, it's a basic bar chart that's charting on change of{db.dateopened}, order by month. Show value is count of {db.ticketid}. Set Summary Option is count {db.ticketid} while showing as a percentage of Grand Total: Count of TicketID.

When I preview the chart, the numbers change from the actual data values to the percentages, as they should.

When I go back to the Chart Expert and change the number format to 100%, that's when I get the 3,200%. And I get the 100*32=3,200, but if I simply go back to chart type and change it top a pie chart, I get the desired results and 32% is displayed.

Perhaps this is a software limitation???

Thanks for the feedback!!
 
mtownbound,

My apologies, but I was unable to replicate the issue with a test database. In my testing, I had an issue with "count" working, but was able to get "sum" to work just fine. With count, it was counting the number of occurances of the ID (always 1, as each ID has a singular quantity attached in my test environment) within the total, instead of the quantity of the item (granted, my test data was perhaps too simplistic for testing).

*lightbulb*
Perhaps too simple of a test... what about creating a formula containing just the number one (1) and Summing it for your chart? as the groups define the tickets in each, and you effectively need each record counted once, it may work (though I have not tested).
{@TicketCounter}
Code:
1

Perhaps worth a shot based on my testing with Count verus Sum.

Hope this helps! [smile]

Mike
---------------------------------------------------------------
"To be alive is to revel in the moments, in the sunrise and the sunset, in the sudden and brief episodes of love and adventure,
in the hours of companionship. It is, most of all, to never be paralyzed by your fears of a future that no one can foretell."
 
Thanks, Mike. I don't think I can perform a sum because I need to count the total tickets and do the percentage of. Again, adding the percentage works flawlessly if I simply change the chart type from bar to a pie. That's what led me to think that it was a program limitation.
 
mtownbound,

Mathematically, they are the same... mostly likely worth a try.
A Count({TicketID}) would tally once per record, increasing by one each record.
A Sum({@ValueofOne}) would "add" once per record, increasing by one each record.
That being said, it seems to be a program limitation of summarizing on "a percentage of" a Count().

If able to create a custom label on the bar chart, are you able to concatenate a percent sign on the end? {Summarized Field} & "%" I don't work much with Charting within Crystal and not sure on this option.

Best of luck mtownbound, sorry I was unable to provide a better solution. [smile]

Cheers!

Mike
---------------------------------------------------------------
"To be alive is to revel in the moments, in the sunrise and the sunset, in the sudden and brief episodes of love and adventure,
in the hours of companionship. It is, most of all, to never be paralyzed by your fears of a future that no one can foretell."
 
Mike,

Thanks for the suggestions, but I was unable to get it to work. Anyone else have any ideas or is this just a software limitation??


Thanks!!
 
Insert a group in your main report (or create the chart in a subreport where you can insert a group) and then insert the chart in the report header or footer. Then create a formula like this:

count({db.ticketid},{db.dateopened},"monthly")/count({db.ticketid})

Add this as your summary field and check "do not summarize". Then format the value and the y axis to percentages (Right click->Format data label->number->percent; format axis label->number->percent).

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top