# Grouping delta

**URL:** <https://discuss.elastic.co/t/grouping-delta/298659>\
**Category:** Kibana\
**Created:** [March 2, 2022, 6:10pm UTC](https://discuss.elastic.co/t/grouping-delta/298659 "2022-03-02T18:10:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![danilomendes](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/danilomendes/32/102520_2.png) [@danilomendes](https://discuss.elastic.co/u/danilomendes)\
**Post date:** [March 2, 2022, 6:10pm UTC](https://discuss.elastic.co/t/grouping-delta/298659/1 "2022-03-02T18:10:47Z")

</div>

I have some documents like those:

```auto
{
timestamp: t,
player: playerA,
team: teamA,
totalPoints: 10
},
{
timestamp: t,
player: playerB,
team: teamA,
totalPoints: 5
},
{
timestamp: t,
player: playerc,
team: teamA,
totalPoints: 10
},

{
timestamp: t+1,
player: playerA,
team: teamA,
totalPoints: 20
},
{
timestamp: t+1,
player: playerB,
team: teamA,
totalPoints: 10
},
{
timestamp: t,
player: playerc,
team: teamA,
totalPoints: 10
},

```

"totalPoints" is an integer with the total points earned by a player until this moment t.

Is there a way to plot in bars the points incremented in time by teams?

---

<div class="post-metadata">

**Author:** ![Tomo\_M](https://avatars.discourse-cdn.com/v4/letter/t/848f3c/32.png) [@Tomo\_M](https://discuss.elastic.co/u/Tomo_M)\
**Post date:** [March 3, 2022, 10:30am UTC](https://discuss.elastic.co/t/grouping-delta/298659/2 "2022-03-03T10:30:23Z")

</div>

If you can get date\_histogram aggregation with the exactly the same interval as the timestamp differences of documents,

Using Lens,

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/b/9/b90a5fdb768f723283e1cc64b285638971a77bb0.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:** [March 31, 2022, 10:30am UTC](https://discuss.elastic.co/t/grouping-delta/298659/3 "2022-03-31T10:30:52Z")

</div>

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