Solved

Percent Variance

Posted on 2008-10-09
7
594 Views
Last Modified: 2011-10-19
Hi,
I have to calculate the percent variance in a Crystal XI report from for each month by Category. Below I am trying to calulate the Month1Variance, Month2Variance...etc.  This must be done in Crystal and not SQL, so it will have to be a Crystal function.  Also attached is a file.

Category 1
Year 1 Month1                   Month2                          Month3
Year 2  Month1                  Month2                          Month3
             Month1Variang      Month2Variance           Month3Variance
Category 2
Year 1 Month1                   Month2                          Month3
Year 2  Month1                  Month2                          Month3
             Month1Variang      Month2Variance           Month3Variance

Thanks in Advance!!
0
Comment
Question by:rocketmonkey
  • 3
  • 2
7 Comments
 
LVL 16

Expert Comment

by:wykabryan
ID: 22680859
You almost want to put this into a cross tab. It would allow you to calcuate the the percentage. This way you are going to struggle a lot because you are grouping on year. The numbers associated with the grouping are summaries based around that grouping; which is next to impossible to figure out in the current lay out.

A cross tab you could set up just like above except you would have the power to put the percentage in.
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 22680961
How are you getting the values for each month.

You will need 12 formulas.  One for each month to calculate the vairance.

mlmcc
0
 

Author Comment

by:rocketmonkey
ID: 22681141
Thanks guys.

Currently, the months are are a group summary, so that there is the ability to drill into the details.

I understand that i would have to have a formula for each month, but I am not sure what that formula would be since it is based upon the previous record (previous year) by category by month.

Attached is the design view.

thanks!!
PercentVariance-DesignView.jpg
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 100

Accepted Solution

by:
mlmcc earned 500 total points
ID: 22681295
Try this for one month.  You can duplicate for the others.

I assume the total cannot be negative.

Group 3 header
WhilePrintingRecords;
Global NumberVar Year1Month1;
Global NumberVar Year2Month1;
Year1Month1 := -1;
Year2Month1 := -1;
''

In the group 4 footer

WhilePrintingRecords;
Global NumberVar Year1Month1;
Global NumberVar Year2Month1;
If Year1Month1 < 0 then
    Year1Month1 := {Your Summary Field}
else
    Year2Month1 := {Your Summary Field}

In the group 3 footer
WhilePrintingRecords;
Global NumberVar Year1Month1;
Global NumberVar Year2Month1;
(Year1Month1 -Year2Month1) / Year1Month1 * 100

mlmcc

0
 
LVL 100

Expert Comment

by:mlmcc
ID: 22683561
If you need the grphic deleted I can get that done for you.

mlmcc
0
 

Author Closing Comment

by:rocketmonkey
ID: 31504756
Thanks!!
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Some time ago I was asked to create a VBA function that would calculate a check digit for an input number, using the following procedure: First, sum up all the individual digits in the number If that sum value has more than one digit, then sum up …
Problem: You created a new custom form in Outlook for your contacts (added fields, deleted fields, changed the layout of fields, whatever) and made it the default form for contacts. The good news is that all new contacts will utilize the new form. T…
Learn how to create and modify your own paragraph styles in Microsoft Word. This can be helpful when wanting to make consistently referenced styles throughout a document or template.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now