Posted By: Tonyak74 — 1 Jul 2022 at 8:22am
I am working on a report counting open and closed Work Orders.
I am trying to create a line chart to show the percentage of closed for each Quarter.
I have only been able to get the counts to show up.
When I try to do a formula for the percentage it is not a data option in the list when creating the chart.
Any assistance would be appreciated.
Edited by Tonyak74 - 01 Jul 2022 at 9:31am
Posted By: kevlray — 5 Jul 2022 at 4:27am
It is hokey at best. But here is what I had to do. i created a formula that looks something like this.
sum({amount to be summed},{column breakdown)/sum({amount to be summed}
Depending on your data, you may need a check for zero (do not want to divide by zero).
Also I changed the axis able to be a percentage and the data label to be a percentage. There was a lot of trial and error until I got it to work. Lots of luck.
Posted By: Tonyak74 — 14 Jul 2022 at 6:25am
Thank you Kevlray.
I appreciate the assistance. You got me on the right track.
I just want to post the following for anyone else struggling with this.
Since I was only counting closed WO I created a formula for closed. Basically, it said if closed is True, then give me the WO #.
Since it was showing the WO # I had to do a distinct count instead of a summary. This gave me the correct value, but I was not able to get it to show the % sign on the chart.
I found the following information on google, which helped me to display the % sign in the legend
https://stackoverflow.com/questions/54039324/how-to-display-percent-symbol-in-y-axis-value-in-crystal-report-line-char
And this one I used in my formula to get the correct position of the percent symbol
http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=4830
My final formula looked like this:
DistinctCount ({@closed}, {WorkOrder.RequestedOn}, "quarterly")% Count ({WorkOrder.WorkOrderKey}, {WorkOrder.RequestedOn}, "quarterly")/100
Hope this helps.