Skip to main content
Answer

Average of Specific Day Over Time

  • November 18, 2025
  • 1 reply
  • 29 views

Forum|alt.badge.img+7

Hi! How would I calculate the average of all instances of X day of month? I have a metric with $X by day, and want to return the average of all 1st, 2nd, 3rd, 4th etc. of the months. Preferably rolling so if my calendar starts in 2024 then Oct 15th 2025 would return ((Oct 14th’24 + Oct 14th’25) / 2).

Thank you!

Best answer by Min Li

Hello ​@ljanowski 
First, create a new column in Day dimension for Day # using this formula:
Day # = Item(rank(Day,Day.Month),'Day #'.Name)

Second, create a new metic for calculating the average value by day #
Target Metric = ‘Source Metric’[BY:->Day.Month.'Month of Year'][BY Avg:Day.'Day #']

Hope it helps.

 

1 reply

Min Li
Master Helper
Forum|alt.badge.img+12
  • Master Helper
  • Answer
  • November 18, 2025

Hello ​@ljanowski 
First, create a new column in Day dimension for Day # using this formula:
Day # = Item(rank(Day,Day.Month),'Day #'.Name)

Second, create a new metic for calculating the average value by day #
Target Metric = ‘Source Metric’[BY:->Day.Month.'Month of Year'][BY Avg:Day.'Day #']

Hope it helps.