# Newbie help \> report of values diff'ed over time

**URL:** https://discuss.elastic.co/t/newbie-help-report-of-values-diffed-over-time/328492
**Category:** Kibana
**Created:** [March 24, 2023, 7:13pm UTC](https://discuss.elastic.co/t/newbie-help-report-of-values-diffed-over-time/328492 "2023-03-24T19:13:43Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![robyb](https://avatars.discourse-cdn.com/v4/letter/r/c4cdca/32.png) [@robyb](https://discuss.elastic.co/u/robyb)
#### Post date: [March 24, 2023, 7:13pm UTC](https://discuss.elastic.co/t/newbie-help-report-of-values-diffed-over-time/328492/1 "2023-03-24T19:13:43Z")

</div>

Can I start my first post with an intro. I'm a Product Manager, so speak to me like I'm not an engineer... 🙂

I have the following dataset. A list of Microsoft license types and a count of number of users with that license assigned, per license type.

 ![Screenshot 2023-03-24 150718](https://us1.discourse-cdn.com/elastic/original/3X/a/5/a5e474b195dc85861b1374097cccad110123bea7.png)  
 ![Screenshot 2023-03-24 150750](https://us1.discourse-cdn.com/elastic/original/3X/f/c/fc6284c94237f8604f6b8e4aac90de8ce04f1bac.png)

We have this as time series data, which is why I use unique counts and I'm limiting my range filter to previous month.

My goal is to do a same version of this, where the count column would display the difference in counts of licenses from 2 months ago vs 1 month ago, to show either an increase, decrease or no change in number of license consumption, per license type.

Can Kibana support this? I've attempted to use a formula for my metric doing something like unique\_count(primaryEmail.keyword, shift="2M") - unique\_count(primaryEmail.keyword, shift="1M"), but then it complains about my Microsoft License row and tells me to use a filter, at which point adding licenses.keyword : \* simply displays something like this rather than continuing to enumerate the license types.

 ![Screenshot 2023-03-24 151307](https://us1.discourse-cdn.com/elastic/original/3X/2/7/279f80c48de1022867b5b8a91659d33f734caa27.png)

Thank you in advance for any guidance!!

---

<div class="post-metadata">

### Author: ![bhavyarm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bhavyarm/32/22392_2.png) [@bhavyarm](https://discuss.elastic.co/u/bhavyarm)
#### Post date: [March 24, 2023, 8:18pm UTC](https://discuss.elastic.co/t/newbie-help-report-of-values-diffed-over-time/328492/2 "2023-03-24T20:18:53Z")

</div>

Hi,

AFAIK, you can use formulas and timeshift in lens to do this - [Analyze time series data | Kibana Guide [8.6] | Elastic](https://www.elastic.co/guide/en/kibana/current/create-a-dashboard-of-panels-with-ecommerce-data.html#compare-time-ranges)

I am also copying @Stratoula_Kalafateli here to give more inputs.

Thanks,  
Bhavya

---

<div class="post-metadata">

### Author: ![Stratoula\_Kalafateli](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stratoula_kalafateli/32/70923_2.png) [@Stratoula\_Kalafateli](https://discuss.elastic.co/u/Stratoula_Kalafateli)
#### Post date: [March 25, 2023, 9:51am UTC](https://discuss.elastic.co/t/newbie-help-report-of-values-diffed-over-time/328492/3 "2023-03-25T09:51:27Z")

</div>

@robyb welcome to our community! Your formula seems correct to me. Can you share the warning you get from Lens?

---

<div class="post-metadata">

### Author: ![robyb](https://avatars.discourse-cdn.com/v4/letter/r/c4cdca/32.png) [@robyb](https://discuss.elastic.co/u/robyb)
#### Post date: [March 27, 2023, 2:08pm UTC](https://discuss.elastic.co/t/newbie-help-report-of-values-diffed-over-time/328492/4 "2023-03-27T14:08:06Z")

</div>

> [@robyb](#):
>
> unique\_count(primaryEmail.keyword, shift="2M") - unique\_count(primaryEmail.keyword, shift="1M")

Thank you for the reply. Here's what I get when I try to enter the formula in my Metric.

 ![Screenshot 2023-03-27 100717](https://us1.discourse-cdn.com/elastic/original/3X/0/6/06d2b48de4e7e814af797173bace5f8753646b70.png)

---

<div class="post-metadata">

### Author: ![Stratoula\_Kalafateli](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stratoula_kalafateli/32/70923_2.png) [@Stratoula\_Kalafateli](https://discuss.elastic.co/u/Stratoula_Kalafateli)
#### Post date: [March 27, 2023, 2:48pm UTC](https://discuss.elastic.co/t/newbie-help-report-of-values-diffed-over-time/328492/5 "2023-03-27T14:48:22Z")

</div>

Do you have a breakdown? Because in that case we don't allow cacuations on metrics with different shifts. The reason is that at that case you have different top values per shift so it doesnt make sense.

---

<div class="post-metadata">

### Author: ![robyb](https://avatars.discourse-cdn.com/v4/letter/r/c4cdca/32.png) [@robyb](https://discuss.elastic.co/u/robyb)
#### Post date: [March 28, 2023, 1:01pm UTC](https://discuss.elastic.co/t/newbie-help-report-of-values-diffed-over-time/328492/6 "2023-03-28T13:01:17Z")

</div>

Thank you. I'm not sure what you mean by a breakdown? What I'm trying to accomplish is to show each license types and the difference in number of counts over the months, but adding a filter doesn't seem to work. If this isn't possible then that's fine, I just don't know what I don't know 🙂

---

<div class="post-metadata">

### Author: ![Stratoula\_Kalafateli](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stratoula_kalafateli/32/70923_2.png) [@Stratoula\_Kalafateli](https://discuss.elastic.co/u/Stratoula_Kalafateli)
#### Post date: [March 28, 2023, 1:18pm UTC](https://discuss.elastic.co/t/newbie-help-report-of-values-diffed-over-time/328492/7 "2023-03-28T13:18:50Z")

</div>

Yes sorry I should be more specific, so you can do something like this

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/5/7/57b0cad43ca6e7586ac4ebee817eb8afec5dc9fd.png)

but if you can't split with top values

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/0/e/0e511cd17a931bc2b6dc3f7d3277562ab686042b.jpeg)

---

<div class="post-metadata">

### Author: ![robyb](https://avatars.discourse-cdn.com/v4/letter/r/c4cdca/32.png) [@robyb](https://discuss.elastic.co/u/robyb)
#### Post date: [March 28, 2023, 1:39pm UTC](https://discuss.elastic.co/t/newbie-help-report-of-values-diffed-over-time/328492/8 "2023-03-28T13:39:22Z")

</div>

Thank you. I think this is solved, I couldn't use "\*" to iterate all the licenses, but if I reference each one it worked 🙂

Much appreciated!

---

<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: [April 25, 2023, 1:39pm UTC](https://discuss.elastic.co/t/newbie-help-report-of-values-diffed-over-time/328492/9 "2023-04-25T13:39:50Z")

</div>

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