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
- 62.3K Get Help
- 364 Global Discussions
- 199 Industry Talk
- 428 Announcements
- 4.4K Ideas & Feature Requests
- 136 Brandfolder
- 127 Just for fun
- 128 Community Job Board
- 445 Show & Tell
- 28 Member Spotlight
- 1 SmartStories
- 283 Events
- 35 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!