Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Show Percentage in a chart Post Reply Post New Topic
Author Message
rlassalle
Groupie
Groupie
Avatar

Joined: 09 Aug 2012
Online Status: Offline
Posts: 57
Quote rlassalle Replybullet Topic: Show Percentage in a chart
     Posted: 16 Jul 2013 at 6:36pm
Hi there,
          I have a database with column values are amount. Crystal get the value field and calculate the % first one 100% then I need to show the percentage calculated in a chart. In order to do that I used this formula
if {@GetMonth} = 'May, 2,013.00' then
    ({@Rk6-9Col_per}) /76
else if {@GetMonth} = 'June, 2,013.00' then
    ({@Rk6-9Col_per}) /85
else if {@GetMonth} = 'July, 2,013.00' then
    ({@Rk6-9Col_per}) /97
It work well;but, I have to adjusted each month number dived each time that I added a day.
The data is grouping by months one page each months
July- 13
i.e.
date    col 9
7/1/13 100.00%
7/2/13 92.65%
7/3/13 92.63%
7/4/13 88.28%

each month is a line in the chart.
any idea will be helpful

Thanks

Rodolfo


IP IP Logged
Sastry
Moderator
Moderator
Avatar

Joined: 16 Jul 2012
Online Status: Offline
Posts: 537
Quote Sastry Replybullet Posted: 18 Jul 2013 at 1:25am
Hi

This is possible only when you insert a count for each time that you add a day.

Insert a count on any column where you don't have nulls then use that value to divide.

Eg:
if {@GetMonth} = 'May, 2,013.00' then
    ({@Rk6-9Col_per}) /Count({uniquecolumn},{MonthGroup})

Thanks,
Sastry
IP IP Logged
rlassalle
Groupie
Groupie
Avatar

Joined: 09 Aug 2012
Online Status: Offline
Posts: 57
Quote rlassalle Replybullet Posted: 18 Jul 2013 at 6:24pm
Thanks for answer. Provably I am not doing well. Because, I got all the series line together in one at 100 the only that take form is the last month July, for instances

else if {@GetMonth} = 'June, 2,013.00' then
    ({@Rk0-1Col_per}) / count({'PPS_Oct_12_'.F3})
else if {@GetMonth} = 'July, 2,013.00' then
    ({@Rk0-1Col_per}) / count({'PPS_Oct_12_'.F3})

June goes up at 100%

Thanks

Rodolfo
IP IP Logged
rlassalle
Groupie
Groupie
Avatar

Joined: 09 Aug 2012
Online Status: Offline
Posts: 57
Quote rlassalle Replybullet Posted: 21 Jul 2013 at 7:05pm
I observed that if I divide July for 100 it get then 100% level- June goes down around 90% - May goes down 70% and the weird thing that January goes up 130%. Look Like that there is a relation but could not find the mathematic relation. So, I do not have to modify the values manually.
IP IP Logged
Sastry
Moderator
Moderator
Avatar

Joined: 16 Jul 2012
Online Status: Offline
Posts: 537
Quote Sastry Replybullet Posted: 21 Jul 2013 at 8:22pm
Hi
 
First you need to insert a group on Month.  I think you have a formula which extracts the month. {@getMonth} 
 
--Insert a group on {@GetMonth}
--Insert record count in the same group footer
--Now in the footer insert summary of {@Rk0-1Col_per}
--Then just divid your summary by count *100 to get percentage
Thanks,
Sastry
IP IP Logged
rlassalle
Groupie
Groupie
Avatar

Joined: 09 Aug 2012
Online Status: Offline
Posts: 57
Quote rlassalle Replybullet Posted: 22 Jul 2013 at 6:29pm
Thanks Sastry,
      I follow your intruction and I got
Sum ({'PPS_Oct_12_'.RK0_1}, {'PPS_Oct_12_'.Date}, "monthly") / ({@Countrec} * 100)
eg #
6784110/ 5* 100 = 11307
52353605 / 30 = 16888
I think the # are so high. The # that work to this are around 100. for instance,
if {@GetMonth} = 'June, 2,013.00' then
    ({@Rk0-1Col_per}) /116
else if {@GetMonth} = 'July, 2,013.00' then
    ({@Rk0-1Col_per}) /100
These # gave me the correct line.
I am going continue trying

Thanks
IP IP Logged
rlassalle
Groupie
Groupie
Avatar

Joined: 09 Aug 2012
Online Status: Offline
Posts: 57
Quote rlassalle Replybullet Posted: 24 Jul 2013 at 4:32pm
I already sent the e-mail with the program attach. Did you get it?
IP IP Logged
rlassalle
Groupie
Groupie
Avatar

Joined: 09 Aug 2012
Online Status: Offline
Posts: 57
Quote rlassalle Replybullet Posted: 29 Jul 2013 at 4:36pm
Sastry. I have sent the attach as you suggested.I would like ti know if you got it if you can help me with the charts line series.

Thanks

Rodolfo
IP IP Logged
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