Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Formula Post Reply Post New Topic
Author Message
hendrikb
Newbie
Newbie


Joined: 26 Jan 2010
Online Status: Offline
Posts: 5
Quote hendrikb Replybullet Topic: Formula
     Posted: 03 May 2010 at 4:30am

Hi

I have a cross tab report with Region and Customer on the left and Product on the top and below
product have current and previous year values with a growth percentage.
Example of layout below.

Region   Customer              Product
                                       2009  2010  growth
Region1  Customer1            
               Customer2
               Customer3
Region1 Sub Total

The growth percentage per Customer works fine, but not sure how to adjust it to calculate
the Region Sub Total growth correctly.
Below the formula I used to calculate growth on the Customer level:

if Sum ({@PreviousYear}, {Command.Customer})=0 then 0 else
(Sum ({@CurrentYear}, {Command.Customer})-Sum ({@PreviousYear}, {Command.Customer}))/Sum ({@PreviousYear}, {Command.Customer})*100

Any help wil be appreciated.

Regards

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