Percentage line chart

Printed From: Crystal Reports Book — Forum Name: Technical Questions

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!
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
Thank you! I will try that.