- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
How to apply a column formula on only a range of rows and not every row?
Hi,
I am trying to create a column formula that calculates the mean of every 5 rows (for a specific column).
Normally the formula are applied to every row using values in such row. Instead, I would like to use values from 5 previous row to calculate a mean value.
I am been playing with the formula editor and try to use the Row() and other functions, but without success.
Thanks a lot to anyone who can help me out.
BR
AC_AC
1 ACCEPTED SOLUTION
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: How to apply a column formula on only a range of rows and not every row?
For Mean I would suggest using Col Moving Average
If(Modulo(Row(), 3) == 0,
Col Moving Average(:Col, 1, 2, 0),
.
)
Otherwise Data table subscripting might be helpful
If(Modulo(Row(), 3) == 0,
Mean(:Col[Index(Row() - 2, Row())])
)
-Jarmo
1 REPLY 1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: How to apply a column formula on only a range of rows and not every row?
For Mean I would suggest using Col Moving Average
If(Modulo(Row(), 3) == 0,
Col Moving Average(:Col, 1, 2, 0),
.
)
Otherwise Data table subscripting might be helpful
If(Modulo(Row(), 3) == 0,
Mean(:Col[Index(Row() - 2, Row())])
)
-Jarmo