Working on formating a sheet where I need to pull normalized data into an analytics page. The criteria is to pull from one tab to the next.
Get data using B & E and then apply the values to preset grouping and find the total count.
Output should be formatted for the 5 timeframes for 7/14/30/60/90 days. Such as:
7 Days: 1M (7)14 Days: 100M+ (2)30 Days: 50-75M (3)60 Days: 10-20M (8)90 Days: 3-10M (9)I've been trying with this formula in this sheet but up against a wall so figure I'd see if anyone has a more elegant solution than where I'm at now?
Here's my logic behind what I'm doing so far:
- Categorize data from F column into the grouping sets with ArrayFormula and If statements to normalize the data into the needed format to find frequency.
- Filter for each timeframe and count occurances for 7 Days / 14 Days / 30 Days / 60 Days / 90 Days.
- Combine results and display data.
I am trying to push this together with a single cell formula but I'm not getting the results needed.
=ARRAYFORMULA(LET( categories, {"1M", "1-3M", "3-10M", "10-20M", "20-30M", "30-50M", "50-75M", "75M-100M", "100M+"}, timeframes, {7, 14, 30, 60, 90}, labels, {"7 Days", "14 Days", "30 Days", "60 Days", "90 Days"}, result, MAP(timeframes, labels, LAMBDA(days, label, LET( filtered, FILTER(Parabolic!F2:F, (Parabolic!B2:B >= TODAY()-days) * (Parabolic!F2:F <> "")), categoryCounts, COUNTIFS(filtered, categories), mostFrequentIndex, MATCH(MAX(categoryCounts), categoryCounts, 0), mostFrequentCategory, INDEX(categories, mostFrequentIndex), countMostFrequent, MAX(categoryCounts), label & " " & mostFrequentCategory & " (" & countMostFrequent & ")" ) )), TEXTJOIN(" ", TRUE, result)