Hi all,
I don't find a good combination of commands to create a timelion visualization to show the sum of the age of unique users.
My idea was to select users by cardinality metric on 'userId' field and sum the age of resulting users by sum metric on 'age' field.
Some on my wrong tests with timelion expressions:
.es(index='*-users-*', timefield=ts, metric=cardinality:userId).es(index='*-users-*', timefield=ts, metric=sum:age).lines(width=2, stack=false, steps=true).color(red).label('Age')
[timelion_vis] > Error: in cell #1: [parsing_exception] [query_string] unknown token [START_OBJECT] after [query], with { line=1 & col=338 }
.es(index='*-users-*', timefield=ts, metric=cardinality:userId, metric=sum:age).lines(width=2, stack=false, steps=true).color(red).label('Age')
I got 1 distinct line for each metric.
Any idea or advice is welcomed.
Thanks