# Timelion range with uniq count

**URL:** <https://discuss.elastic.co/t/timelion-range-with-uniq-count/361981>\
**Category:** Kibana\
**Created:** [June 24, 2024, 9:07pm UTC](https://discuss.elastic.co/t/timelion-range-with-uniq-count/361981 "2024-06-24T21:07:10Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![elasticforme](https://avatars.discourse-cdn.com/v4/letter/e/f05b48/32.png) [@elasticforme](https://discuss.elastic.co/u/elasticforme)\
**Post date:** [June 24, 2024, 9:07pm UTC](https://discuss.elastic.co/t/timelion-range-with-uniq-count/361981/1 "2024-06-24T21:07:10Z")

</div>

I have sample with five min interval data is like this

```auto
time host job# mem_used (bytes)
00:05 host1 "123" 1,085,030,400
00:05 host2 "123" 1,085,030,500
00:05 host3 "124" 1,085,030,500
00:05 host4 "123" 1,085,030,400
00:05 host5 "125" 10,085,030,500
00:05 host6 "124" 2,085,030,500

```

what I need it range of uniq job running with max memory  
0 to 8 gig ram -\> 2 job  
9 to 16gig ram -\> 1 job (host 6 is using 10gig uniq count is 1)

job 123 & 124 are using max 0-8gig  
job 125 is using max 9-16 gig

I think timelion can achieve this but I am not getting any success

```auto
> .es(index=myindex,interval=5m, timefield='@timestamp', metric=cardinality:job.keyword)
> .lines(width=1)
> .color(yellow)
> .label("0-8gb #Jobs"),        
> .es(index=myindex,interval=5m, timefield='@timestamp', metric='max:mem_used').divide(1073741824).range(0,8)
> .label("Max mem_used - GB")

```

here whatever range I select it gives me same result.

What am I missing?
