Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
chaiwaykeat
Contributor II
Contributor II

Calculation with filtered data range

How to create a column where the expression of the column will be to only be average of the past 3 month avg yield rate (billing month)  from the dock date for example if the dock date is 2020 Jan than the data use to calculate will be (0.60+0.66+0.68)/3

Untitled.png

1 Reply
Rodj
Luminary Alumni
Luminary Alumni

I'm not sure I understand properly what you are trying to do. Are you trying to get an average for the 3 most recent months per dock date yearmonth, or are you after a sliding type average regardless of the dock date?

This sounds like something RangeAvg would be good for, something like:

rangeavg(above(sum([Avg Yield Rate]),1,3))

This will give you a sliding average result, I've used above for the 3 most recent records, but depending on your sort order you can change that to Below or whatever is appropriate.

Hope that helps somewhat.

Rod