Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2016 : Technical Questions
Message Icon Topic: Percentage line chart Post Reply Post New Topic
Author Message
victoria61485
Newbie
Newbie


Joined: 14 Apr 2010
Online Status: Offline
Posts: 19
Quote victoria61485 Replybullet Topic: Percentage line chart
    Posted: 04 Feb 2020 at 5:15am
Hello,

I have a report with an ID number field called BABY_MRN. I also check a criteria for the record for each BABY_MRN and if these records meet the criteria another field, COLD_IN_TIME_FRAME, is populated with a 1 for that BABY_MRN. I would like a line chart that shows, for month to month, the percentage of BABY_MRN's where COLD_IN_TIME_FRAME, is populated with a 1, vs the total number of BABY_MRN's. I have been able to build a line chart that shows month to month the sum of BABY_MRN's where COLD_IN_TIME_FRAME, is populated with a 1, but I need what percentage this represents to the total. Any help would be greatly appreciated!
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3674
Quote hilfy Replybullet Posted: 06 Feb 2020 at 4:51am
To get a percentage, you need to do more than just sum. I would create a formula that looks something like this (assumes that you have a group on the date that's set to view monthly):

Sum({table.COLD_IN_TIME_FRAME}, {table.DateField}, "monthly") % Count({table.BABY_MRN}, {table.DateField}, "monthly")

This will display the values and might work in the chart. Also, the "%" operator will automatically give you a percentage that automatically multiplies the result by 100 instead of you having to explicitly do the multiplication in the formula.

-Dell
IP IP Logged
victoria61485
Newbie
Newbie


Joined: 14 Apr 2010
Online Status: Offline
Posts: 19
Quote victoria61485 Replybullet Posted: 13 Feb 2020 at 3:43am
Thank you! I will try that.
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.047 seconds.