Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Percent Change Formulas Post Reply Post New Topic
Author Message
LittleMojo
Newbie
Newbie


Joined: 20 May 2010
Location: United States
Online Status: Offline
Posts: 2
Quote LittleMojo Replybullet Topic: Percent Change Formulas
     Posted: 20 May 2010 at 10:49am
Would really appreciate some help with this, because I'm completely stumped.  I have a crosstab report that is summarizing unit volume by manufacturer down the side and by fiscal year and quarter across the top.  Need to calculate two percent change formulas...
- one for the most recent quarter compared to the same quarter one year earlier
- second one is the growth rate from the very first quarter to the most recent quarter.
 
I'm a newbie and understand almost nothing about formulas, etc. beyond basic CR so any assistance would be appreciated.  Or for pointing towards online resources that might show how to accomplish this.
 
Thanks!
IP IP Logged
LittleMojo
Newbie
Newbie


Joined: 20 May 2010
Location: United States
Online Status: Offline
Posts: 2
Quote LittleMojo Replybullet Posted: 26 May 2010 at 9:47am
FYI...
 
I stumbled onto what embedded summaries are, and was able to accomplish this.  Code for a percent change over four quarters follows...
 
if CurrentColumnIndex < 4 then
    0
else
    if GridValueAt (CurrentRowIndex, CurrentColumnIndex-4, 0)=0 then
    0
    else
    (((GridValueAt (CurrentRowIndex, CurrentColumnIndex, 0)/GridValueAt (CurrentRowIndex, CurrentColumnIndex-4, 0))^(1/(4+1)))-1)*100
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