Solved

Cross Tab-Need to Exclude Zero Values from Average Formula

Posted on 2011-03-08
7
1,505 Views
Last Modified: 2012-06-27
Trying to calculate Average of Annualized Salary Change amounts but it is off because zero amounts are being calculated in the average.  Any help would be most appreciated.
0
Comment
Question by:twkyoscr
  • 2
  • 2
  • 2
  • +1
7 Comments
 
LVL 19

Expert Comment

by:GJParker
ID: 35070899
Show details of your crosstab setup and the calculations your using.
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 35071216
The only way to affect summaries in the cross tab is to not include the 0 data in the report.  I assume th e0s are because of lack of data for a given row or column.

mlmcc
0
 

Author Comment

by:twkyoscr
ID: 35071455
Mlmcc,
The problem that I am having with the cross tab is that I cannot seem to keep a placeholder for null values.  What I ended up doing is writing a union (in Peoplesoft Query) to also inlcude those that had no adjustment so that the report would still have each manager listed.  I excluded those that had no adjustment from the counts, but the average is now the issue.  I created a running total which I entered a formula under evaluate to do the following: {@Annualized ChgAmtRnd}<>0
However the average amount is correct for some managers and off slightly for others.  
crystal-issue.bmp
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 100

Assisted Solution

by:mlmcc
mlmcc earned 100 total points
ID: 35072476
NULL is not the same as 0 unless you are converting it.

The cross tab uses the information presented so if there is no data it converts that to 0 and then unfortunately uses it in the summary.

The only way I can see around this is to build your own manual cross tab and calculate the average s without including the NULLs

mlmcc
0
 
LVL 34

Accepted Solution

by:
James0628 earned 400 total points
ID: 35106631
You might be able to do this using a weighted average, instead of a regular average.  If you don't want the average to include the records where {@Annualized ChgAmtRnd} = 0, you could create a formula like this:

if {@Annualized ChgAmtRnd} <> 0 then
  1

 Then make your summary "Weighted average with", and select that formula for the "with" part.  The idea is that all of the records where {@Annualized ChgAmtRnd} is not 0 will be given a weight of 1, so they'll be included in the average (with an equal weight), and the records where {@Annualized ChgAmtRnd} is 0 will have a weight of 0, so they'll be excluded from the average.

 This could work.  It depends a lot of what's in the {@Annualized ChgAmtRnd} formula.

 James
0
 

Author Closing Comment

by:twkyoscr
ID: 35217402
Thanks everyone for your assistance!  After applying your suggestions and tweaking the data a bit, I ended up with the correct results!
0
 
LVL 34

Expert Comment

by:James0628
ID: 35221514
You're welcome.  Glad I could help.

 James
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
As a trusted technology advisor to your customers you are likely getting the daily question of, ‘should I put this in the cloud?’ As customer demands for cloud services increases, companies will see a shift from traditional buying patterns to new…

867 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

21 Experts available now in Live!

Get 1:1 Help Now