Good morning Harley -
Not certain I understand the goal but the formulas that you created are looking at individual records in the data set and identifying the point at which one of the dimensions changes - eg age goes from 39 to 35 - It then looks at the current record avg (that is the average of that single record not all the records in the "30 group" and compares it to the first record in the next group "the 35 group"
If you coal is to compare averages in the entire age subgroups you will need to start by creating the subgroup averages using LOD's - (the LOD will create the average for the subgroup and return it as a single value that is NOT an aggregate in itself) then use the LOD expressions in you conditional statement that looks for the divisions between groups
If this posts assists in resolving the question, please mark it helpful or as the 'correct answer' if it resolves the question. This will help other users find the same answer/resolution. Thank you.
The reason that I used AVG is because LOOKUP can't simply take [Rate] as is, even though there is only 1 unique value of [Rate] with the way I set-up the grids in the sheets.
For example, in the Age sheet, the cell of Age 30 and Term 12 should be a formula of
([Rate] of the next age in ascending order)/([Rate] of the current age 30), with all other variables/factors being the same between the numerator and denominator.