Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.
Originally posted by: timonkZon,
Hello. This depends heavily on how you have your data organized. If you have a record set for this person, one way you could do this is to use an Aggregation node, which aggregates on the persons account or name (whatever their unique key is). As part of that aggregate, you create local variables to SUM the amount of usage and do any other checks you like. (say a variable TOTAL).
The Aggregate node checks for the special booleans FirstInGroup and LastInGroup (for whatever your aggregate key expression was). You check for FirstInGroup to initialize any count/summing variables, and the node looks for LastInGroup as part of it's emit statement.
You can create a local variable like
TOTAL = 0 where firstInGroup
TOTAL = TOTAL + USAGE
Then you should be able to modify the output to look for the threshold barrier.
emit *
where lastInGroup or TOTAL > 200
Of course you can output new fields at that point if you want, or alter a fields value.
I recommend taking a look at your BRAINScript help file and the Aggregate node help file.
Regards
Timon Koufopoulos
MDA Support.