Collecting Average Between 2 Ranges
Hi all!
I am trying to collect an average over the last 12 rows (including the current row). To do this, I created 2 additional helper columns (Line-ID and Row#), and trying enclosing the condition in an AND clause, however this seems to return unparseable. I think I am on the right path or way of thinking here, but that it may be a syntax error. If anyone could help out with the formula, it would be much appreciated!
Here is the formula I am working with right now:
=AVG(COLLECT([TIME]:[TIME], AND(([ROW#]:[ROW#], >[ROW#]@row - 13), ([ROW#]:[ROW#], <[ROW#]@row + 1))))
I am trying to return the avg of the last 12 weeks (each row is a week) of the column "TIME". This means (at least by my logic), I want to capture all the values where @Row-13 <@Row<@Row+1.
Best Answer
-
You don't need the AND function or the parenthesis around the range/criteria sets.
Answers
-
You don't need the AND function or the parenthesis around the range/criteria sets.
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 64.2K Get Help
- 419 Global Discussions
- 221 Industry Talk
- 461 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 142 Just for fun
- 58 Community Job Board
- 462 Show & Tell
- 32 Member Spotlight
- 1 SmartStories
- 299 Events
- 38 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!