timotech01
Programmer
- Aug 25, 2010
- 6
Hi All, I have a problem calculating percentages for my data
I have a set of data that are represented in this format:
Etisalat
Media May June
TV Total 566484 687585
Radio Total 273848 734849
GlobaCom
Media May June
TV Total 373644 675738
Radio Total 172736 436487
how can i format my report to achieve something like this:
Etisalat
Media May June
TV Total 566484 687585
60% 53%
Radio Total 273848 734849
70% 80%
GlobaCom
Media May June
TV Total 373644 675738
40% 47%
Radio Total 172736 436487
30% 20%
Etisalat and Globacom are Group headers coming from this field {stp_GetShareOfVoiceReportByValue_sel;1.Brand}
I wrote this formular:
if {stp_GetShareOfVoiceReportByValue_sel;1.Medium} = "TV Total" then
{stp_GetShareOfVoiceReportByValue_sel;1.May}/Sum ({stp_GetShareOfVoiceReportByValue_sel;1.May}) * 100
else if {stp_GetShareOfVoiceReportByValue_sel;1.Medium} = "Radio Total" then
{stp_GetShareOfVoiceReportByValue_sel;1.May}/Sum ({stp_GetShareOfVoiceReportByValue_sel;1.May}) * 100
but it only gets the wrong percentages
Please what can i do
Thanks
Timotech
I have a set of data that are represented in this format:
Etisalat
Media May June
TV Total 566484 687585
Radio Total 273848 734849
GlobaCom
Media May June
TV Total 373644 675738
Radio Total 172736 436487
how can i format my report to achieve something like this:
Etisalat
Media May June
TV Total 566484 687585
60% 53%
Radio Total 273848 734849
70% 80%
GlobaCom
Media May June
TV Total 373644 675738
40% 47%
Radio Total 172736 436487
30% 20%
Etisalat and Globacom are Group headers coming from this field {stp_GetShareOfVoiceReportByValue_sel;1.Brand}
I wrote this formular:
if {stp_GetShareOfVoiceReportByValue_sel;1.Medium} = "TV Total" then
{stp_GetShareOfVoiceReportByValue_sel;1.May}/Sum ({stp_GetShareOfVoiceReportByValue_sel;1.May}) * 100
else if {stp_GetShareOfVoiceReportByValue_sel;1.Medium} = "Radio Total" then
{stp_GetShareOfVoiceReportByValue_sel;1.May}/Sum ({stp_GetShareOfVoiceReportByValue_sel;1.May}) * 100
but it only gets the wrong percentages
Please what can i do
Thanks
Timotech