
1. Re: Avg wrongly calculated
Amit Narkar Jun 20, 2017 4:12 AM (in response to Alessio Rossotti)Could you share any sample data or workbook?

2. Re: Avg wrongly calculated
Michael Gillespie Jun 20, 2017 5:16 AM (in response to Alessio Rossotti)Alessio:
Can you do some simple debugging to make sure that all the expressions are returning the values you expect? The technique is to break each component of what you're doing down into its constituent parts so you can see into the calculations. After each step, drop the calculated field you create onto a blank worksheet to see the results.
1) Create 2 calculated fields for the MIN and MAX values you want to use:
Min of Lower: MIN([lower])
Max of Upper: MAX ([upper])
Do those 2 return 130 and 145 respectively?
2) Now create the sum of those 2 fields:
Sum of Max & Min: [Min of Lower] + [Max of Upper]
Does this return 275?
3) Finally, create an Average calculation:
Average of Max + Min: [Sum of Max & Min]/2
Does this return 138.5?
Your problem will be found somewhere in there!