troubleshooting Question

Running Totals based on a condition

Avatar of csprague7331
csprague7331Flag for United States of America asked on
DatabasesCrystal ReportsSQL
9 Comments1 Solution768 ViewsLast Modified:
I'm trying to create something similar to a running total for a Crystal report.  I would like to find the average of a field "Score" on change of a date field. ( I also am using 2 groupings, first by "location" then by "Source".)  

 My big problem is that some of the "Score" values are null.   I created a statement in my SQL converting all null fields to -1, hoping that I could create a running total field in Crystal to average fields only where the value does not equal -1.  I select "Use a Formula" and input {Command.Score} <> -1 under "Evaluate" and then "Reset" on change of the date field, however this seems to be evaluating an aggregate average for each date for all 'Score" values  in the report, and not the small sample I have in my grouping.  

Is there a way I can average the values (not equal to -1) for each date within my grouping?

Thanks!!
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 9 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 9 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros