Hi Jesper,
You can use the Summation function with an If() condition to do this.
Here's a picture of what it would look like in the formula editor.
![3927_JMPScreenSnapz002.png 3927_JMPScreenSnapz002.png](https://community.jmp.com/t5/image/serverpage/image-id/195iC80417A5AA393AB2/image-size/medium?v=v2&px=400)
And here's the text version:
Summation(
i = Row() - 7,
Row() + 7,
If( :DAY == :DAY
:DIAMETER,
.
)
) / Summation( i = Row() - 7, Row() + 7, If( :DAY == :DAY, 1, . ) )
Hope that helps.
-Jeff
-Jeff