Forum Discussion

prasadhebbar315's avatar
prasadhebbar315
Advocate I
3 years ago
Solved

Average Interactions based on historical dates

Hello everyone,

I have data with Date, Day and Interactions. 

The interactions are spread accross weeks and I am looking for a mesaure to caluclate average interactons based on day (Monday, Tuesday etc..) for the last 4 weeks. In the below table I have data from 06/26 (Monday) till 07/23(Sunday). I need a measure to automatically calculate Monday average based on last 4 mondays interactions. That is (100+104+122+104)/4 = 108. Likewise it has to clauclate last 4 weeks average for Tuesday, Wednesday ...Sunday. When the new week arrives, the calculation has to shift by 1 week to pick up last 4 weeks average. Any help is appreciated.

 

DateDayInteractionsDesired_Output
6/26/2023Monday100108
6/27/2023Tuesday8995
6/28/2023Wednesday6379
6/29/2023Thursday7272
6/30/2023Friday3355
7/1/2023Saturday2028
7/2/2023Sunday1014
7/3/2023Monday104 
7/4/2023Tuesday93 
7/5/2023Wednesday88 
7/6/2023Thursday72 
7/7/2023Friday60 
7/8/2023Saturday30 
7/9/2023Sunday15 
7/10/2023Monday122 
7/11/2023Tuesday101 
7/12/2023Wednesday75 
7/13/2023Thursday63 
7/14/2023Friday55 
7/15/2023Saturday32 
7/16/2023Sunday12 
7/17/2023Monday104 
7/18/2023Tuesday98 
7/19/2023Wednesday90 
7/20/2023Thursday80 
7/21/2023Friday70 
7/22/2023Saturday30 
7/23/2023Sunday18 

 

 

3 Replies