Beast Mode for Sum of a variable

JoJo_JW ⚪️
edited January 4 in Beastmode & Analytics

Hi, I've got a dataset with credit orders. We have an initial value for each order and the active balance.

I would like to categorize the orders into buckets but not by order but by their belonging to a organization (the organization is a variable we've got in our dataset as well for each order). One organization may have hundreds of orders that make up their organizational active balance. That organizational active balance I'd like to categorize.

This is the Beast Mode I've been using - but it'll only categorize each order separately.

E.g. if an organization only has orders with a max active balance of 1000 but they've got more than 100 of them, I would like to categorize this organization as one with active balances above 100k (and not one that is below 5.5k)


WHEN `# Active Balance` < 1 THEN 'NO ACTIVE BALANCE'

WHEN `# Active Balance` < 1000 THEN 'ACTIVE BALANCE BELOW 1k'

WHEN `# Active Balance` < 5501 THEN 'ACTIVE BALANCE BELOW 5.5k'

WHEN `# Active Balance` < 42001 THEN 'ACTIVE BALANCE BELOW 42k'

WHEN `# Active Balance` < 1000000 THEN 'ACTIVE BALANCE BELOW 1m'

WHEN `# Active Balance` > 999999 THEN 'ACTIVE BALANCE ABOVE 1m'