Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Conditional Percentages and summation Post Reply Post New Topic
Author Message
timotech
Newbie
Newbie
Avatar

Joined: 23 Aug 2010
Location: Nigeria
Online Status: Offline
Posts: 1
Quote timotech Replybullet Topic: Conditional Percentages and summation
     Posted: 23 Aug 2010 at 1:10am
Hi all, I have this data:
media        May                 Jun
TV Total     672,798.50     567,990.00
 
Rad Total   752,063.00     345,900.00
 
and i want to be able to achieve this:
 
ETISALAT - Group header
 
media        May                 Jun
TV Total     672,798.50     567,990.00
Sov%        98%                62%
 
Rad Total   352,063.00     645,900.00
Sov%         34%               64%
 
GLOBACOM - Group header
 
media        May                 Jun
TV Total     134,000.50     567,990.00
Sov%        2%                  38%
 
Rad Total   652,063.00     385,900.00
Sov%         66%               46%
 
 
if you notice, you find out that the percentage of 'Tv Total' for ETISALAT and GLOBACOM all add up to be 100%
 
I tried writing a formula for the months separately using this:
if ({stp_GetShareOfVoiceReportByValue_sel;1.Media} = "TV Total") then
{stp_GetShareOfVoiceReportByValue_sel;1.May} % Sum ({stp_GetShareOfVoiceReportByValue_sel;1.May})
 
but what i noticed is that the sum({stp_GetShareOfVoiceReportByValue_sel;1.May}) is getting the sum of all the data in may and not only the sum when Media = 'TV Total'
 
hence if i do an addition of the 'TV Total' sums for may, it should give me = 806799, but instead it gives = 1810925.
 
Please any help will be appreciated
Timotech Changing the world
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