Trying to average
-
- Posts: 170
- Joined: Tue Oct 10, 2017 12:44 pm
Trying to average
I have 2 tables linked, a master and slave, a one to many. The many table is date oriented with monthly values. What I want to do is create an average of the first 2 months of data for each entity in the master table, regardless of how many dates there are total. I tried doing a conditional total (average) and using a counter on the dates, but it would not let me base a condition on a total field. Then I tried to do it by creating a calculated field that is equal to the value for that month if it is month 1 or 2, zero otherwise. I get an average but it includes all the months of zeroes, so the answer is wrong.____Any ideas?____thanks__Fred EMmerich
-
- Posts: 0
- Joined: Tue May 01, 2018 10:03 pm
=> RE: Trying to average
__Fred, how about showing us your present code for computing the average. If I understand you correctly, the average is being computed as:__ The sum of months 1 & 2 values divided __ by the total number of months (instead of 2).____Often a fresh pair of eyes will spot the problem quickly, so show us what you are doing specifically. Thanks.
=> RE: Trying to average
Try returning BLANKNUM() instead of 0. BLANKNUM records will not contribute to the average.____Kathleen__R&R Support