How to group aggregate values into buckets?

I have a google sheet full of donation transactions like this

name, date, amount

And I built a simple Looker table showing the aggregate donations for each ‘name’ over some period of time like this:

name, total_donations

I’d like to have a third column (bucket) with rules like this:

if (
  Amount >= 2500, "Gold",
  if Amount >= 1000, "Silver",
    if Amount >= 250, "Bronze",
      if Amount >= 50, "Friend",
        "N/A"
      )
    )
  )
)

However, the above calculated field is applied per-row of the raw data … how can I apply the same logic to the aggregate SUM of Amount?

0 0 681
0 REPLIES 0
Top Labels in this Space
Top Solution Authors