Cross Tab-Need to Exclude Zero Values from Average Formula

Posted on 2011-03-08
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.
Question by:twkyoscr
  • 2
  • 2
  • 2
  • +1
LVL 19

Expert Comment

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

Expert Comment

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.


Author Comment

ID: 35071455
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.  
Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

LVL 100

Assisted Solution

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

LVL 34

Accepted Solution

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

 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.


Author Closing Comment

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

Expert Comment

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


Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Sending a Secure fax is easy with eFax Corporate ( First, Just open a new email message.  In the To field, type your recipient's fax number You can even send a secure international fax — just include t…

758 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

15 Experts available now in Live!

Get 1:1 Help Now