Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
yvonne-c
Creator
Creator

Rolling average, 3 period average

I need to create the figures in the bottom table as KPIs - just struggling with the expression for the 3 batch average - it works in my main table but I can't get it to work alone

Can anybody help with this?

Thanks

DATE INAvg(DLWG1)Avg(aggr(rangeavg(above(Total Avg({<[DATE IN]=>}DLWG1),0,3)),[DATE IN]))
20/12/20181.021.02646717
10/01/20191.061.033968929
24/01/20191.131.070667567
07/02/20191.251.146228954
21/02/20191.271.216261005

 

Latest Batch3 Batch Avg
1.271.22
Labels (3)
1 Solution

Accepted Solutions
Anil_Babu_Samineni

Perhaps this?

1. Max({<[DATE IN] = {"$(=Max([DATE IN]))"}>} Aggr(Avg(DLWG1), [DATE IN]))

2. Avg({<[DATE IN] = {"$(=Max([DATE IN]))"}>} aggr(rangeavg(above(Total Avg({<[DATE IN]=>}DLWG1),0,3)),[DATE IN]))

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful

View solution in original post

3 Replies
Anil_Babu_Samineni

Perhaps this?

1. Max({<[DATE IN] = {"$(=Max([DATE IN]))"}>} Aggr(Avg(DLWG1), [DATE IN]))

2. Avg({<[DATE IN] = {"$(=Max([DATE IN]))"}>} aggr(rangeavg(above(Total Avg({<[DATE IN]=>}DLWG1),0,3)),[DATE IN]))

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
yvonne-c
Creator
Creator
Author

Number 2 works great!

Thankyou

Anil_Babu_Samineni

Glad you like my second expression, But can you simplify as this for first one?

Avg({<[DATE IN] = {"$(=Max([DATE IN]))"}>} DLWG1)

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful