Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Cross Tab Percentage Increase Post Reply Post New Topic
Author Message
kenyon29
Newbie
Newbie


Joined: 03 Jan 2012
Location: United States
Online Status: Offline
Posts: 2
Quote kenyon29 Replybullet Topic: Cross Tab Percentage Increase
     Posted: 03 Jan 2012 at 5:59am
I have a question regarding cross tabs. I'm using Crystal reports 2008. My report has a cross tab with data set up by yearly quarters:

          Qtr 1   Qtr 2   Qtr 3   Qtr 4 Total
Joe        1       3       8       2     14
Sam        2       6       1       3     12
Lucy        1       2       3       1     7
Total       3       11      12      6     32

I want to add columns between the quarters that show the percentage increase or decrease from one quarter to the next:

          Qtr 1 %Change Qtr 2
Joe        1     +200     3       
Sam        2     +200     6       
Lucy        1     +100     2      
Total       3     +266    11      

The data represents simple sums from the report. A percent change formula is:

Quarter 2 - Quarter 1
        Quarter 1

How do I insert the percentage change formula into the cross tab and how would I write it in Crystal.

Thanks.
IP IP Logged
kostya1122
Senior Member
Senior Member
Avatar

Joined: 13 Jun 2011
Online Status: Offline
Posts: 475
Quote kostya1122 Replybullet Posted: 03 Jan 2012 at 11:41am
i would suggest not to use crosstab
create a group on  table.names
create a formula for each Quarter( something like (if table.date in startdate to end datethen table.names) place then into report details then right click on then insert> select summery...
place those summaries onto group header.

as for  Change(q1-q2) formula
(sum(Qtr 1, table.date)/sum(Qtr 2, table.date)- 1)*100

then true format text add % sign
IP IP Logged
kenyon29
Newbie
Newbie


Joined: 03 Jan 2012
Location: United States
Online Status: Offline
Posts: 2
Quote kenyon29 Replybullet Posted: 12 Jan 2012 at 3:43pm
This worked great!! Thank you.
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