Forum Discussion
What do you think of thunks?
This thread is mainly to illustrate technique, not to solve concrete task. However. Perhaps I missed something, but all solutions take 2 records back and 2 records forward for the range. Not dates. What if we take the range for dates (assuming they are not sequential and some could be missed), i.e. [Date] -2, not two records back ?
Introducing new parameters to a problem often means considering a new approach. For example:
=FILTER(Data, MAXIFS(Data[Value], Data[Date], ">=" & Data[Date] - 2, Data[Date], "<=" & Data[Date] + 2) = Data[Value])
However, I do respect PeterBartholomew1 for his quest to find a generalized approach for any given situation. My answer to the question, "What do you think of thunks?", remains the same: I think they're great for some situations and overkill for others. I would highly encourage anyone who's taken an interest in this sort of thing to explore the concepts that Peter has shared, but to also explore alternative methods as well. The more you know, the better your chances will become for finding an appropriate solution to any problem. ;)