TS: Aggregate across labels

Am I right in thinking I can’t aggregate across labels. i.e. slice and dice?

Given
TS.ADD 1 4.4 color=red day=monday
TS.ADD 1 5.6 color=red day=tuesday
When
I do somefunction sum color=red
Then
expected = 10

I was able to do it without a problem. I think you have a syntax error in your TS.ADD command. You’re setting a label of color=red with a value of day=monday. The = is needed in the FILTER argument of TS.MRANGE and it’s ilk, but not for TS.ADD.

127.0.0.1:6379> TS.ADD foo * 4.4 LABELS color red day monday
127.0.0.1:6379> TS.ADD foo * 5.6 LABELS color red day tuesday

127.0.0.1:6379> TS.MRANGE - + AGGREGATION sum 100000 FILTER color=red

1) 1) "foo"
   2) (empty array)
   3) 1) 1) (integer) 1612890200000
         2) 10

Also, props on a tidy Given, When, Then arrangement. I too have done much Cucumber. :wink: