# TSVB Metric shows different value than Metric

**URL:** https://discuss.elastic.co/t/tsvb-metric-shows-different-value-than-metric/192289
**Category:** Kibana
**Created:** [July 25, 2019, 5:01pm UTC](https://discuss.elastic.co/t/tsvb-metric-shows-different-value-than-metric/192289 "2019-07-25T17:01:09Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![wwalker](https://avatars.discourse-cdn.com/v4/letter/w/43a26b/32.png) [@wwalker](https://discuss.elastic.co/u/wwalker)
#### Post date: [July 25, 2019, 5:01pm UTC](https://discuss.elastic.co/t/tsvb-metric-shows-different-value-than-metric/192289/1 "2019-07-25T17:01:09Z")

</div>

I have two visualizations that are setup to count the unique number of IPs in a given field. TSVB shows one number that is significantly higher than Metric does. Below is an example followed by my settings for each visualization. Can someone explain what's going on and where I am wrong at?  
 ![image](https://us1.discourse-cdn.com/elastic/original/3X/7/f/7f31556a330f900384c4b49d130557cc929bbb19.png)

**TSVB Metric**

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/d/6/d627d5aa28913c9fccb32b96a8a8d3e80c3e2826.png)

**Metric**  
 ![image](https://us1.discourse-cdn.com/elastic/original/3X/1/d/1db5b15cbd99116a6e5a15ed55e7013f83d593ce.png)

---

<div class="post-metadata">

### Author: ![wylie](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/wylie/32/81794_2.png) [@wylie](https://discuss.elastic.co/u/wylie)
#### Post date: [July 25, 2019, 5:16pm UTC](https://discuss.elastic.co/t/tsvb-metric-shows-different-value-than-metric/192289/2 "2019-07-25T17:16:27Z")

</div>

It looks like you are applying a Cumulative Sum to the cardinality in TSVB, but not in Visualize. This would explain the different counts.

---

<div class="post-metadata">

### Author: ![wwalker](https://avatars.discourse-cdn.com/v4/letter/w/43a26b/32.png) [@wwalker](https://discuss.elastic.co/u/wwalker)
#### Post date: [July 25, 2019, 5:30pm UTC](https://discuss.elastic.co/t/tsvb-metric-shows-different-value-than-metric/192289/3 "2019-07-25T17:30:39Z")

</div>

As far as I'm aware, you can't do that in the metric visualization. In addition, the goal is to show the unique number of terms over the given time range....so which visualization is properly configured to reflect that number?

---

<div class="post-metadata">

### Author: ![wylie](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/wylie/32/81794_2.png) [@wylie](https://discuss.elastic.co/u/wylie)
#### Post date: [July 25, 2019, 6:40pm UTC](https://discuss.elastic.co/t/tsvb-metric-shows-different-value-than-metric/192289/4 "2019-07-25T18:40:53Z")

</div>

Both TSVB and Visualize can be configured correctly to show the unique values in your entire timerange. TSVB uses time buckets for all metrics unless you specifically tell it not to using the Panel Options -\> Data timerange mode -\> Entire time range (instead of "Last value")

 ![02](https://us1.discourse-cdn.com/elastic/original/3X/f/e/fedc30418217da683f5ca15fc2c89a9af60a50b2.png)

What the cumulative sum was doing in your configuration was adding up the # of uniques per date interval, which is not the same thing as # of uniques in the whole range.

I suspect that you will be better served by creating a Visualize metric because of this default behavior of TSVB.

---

<div class="post-metadata">

### Author: ![wwalker](https://avatars.discourse-cdn.com/v4/letter/w/43a26b/32.png) [@wwalker](https://discuss.elastic.co/u/wwalker)
#### Post date: [July 25, 2019, 8:08pm UTC](https://discuss.elastic.co/t/tsvb-metric-shows-different-value-than-metric/192289/5 "2019-07-25T20:08:20Z")

</div>

hmm...I don't have that, I'm running Kibana 7.2.0 on a basic license, if that matters.

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/4/1/41a8297b7f9504993e47ffe2ec0ec5ba1accd6c0.png)

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [August 22, 2019, 8:08pm UTC](https://discuss.elastic.co/t/tsvb-metric-shows-different-value-than-metric/192289/6 "2019-08-22T20:08:31Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
