# \[Solved\] Create a chart showing data from previous week

**URL:** <https://forum.bubble.io/t/solved-create-a-chart-showing-data-from-previous-week/38893>\
**Category:** Questions\
**Created:** [September 28, 2018, 7:31pm UTC](https://forum.bubble.io/t/solved-create-a-chart-showing-data-from-previous-week/38893 "2018-09-28T19:31:58Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ryan10](https://avatars.discourse-cdn.com/v4/letter/r/97f17d/32.png) [@ryan10](https://forum.bubble.io/u/ryan10)\
**Post date:** [September 28, 2018, 7:31pm UTC](https://forum.bubble.io/t/solved-create-a-chart-showing-data-from-previous-week/38893/1 "2018-09-28T19:31:58Z")

</div>

So I have a system where an admin user can give other users “Points.”

I am able to track the total number of points that an admin user has given out as well as the creation date that individual points were given, who the points were given to, etc…

I’m trying to create a chart that shows how many points each user was given that month/week/day…etc…

Does anyone know how to do this? Screenshot of how the data is recorded below:

 ![56](https://us1.discourse-cdn.com/bubble/original/3X/4/d/4d0428429b017783e7ea18cd7c94c309a2b7351e.png)

---

<div class="post-metadata">

**Author:** ![dan1](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/dan1/32/23411_2.png) [@dan1](https://forum.bubble.io/u/dan1)\
**Post date:** [September 28, 2018, 8:32pm UTC](https://forum.bubble.io/t/solved-create-a-chart-showing-data-from-previous-week/38893/2 "2018-09-28T20:32:32Z")

</div>

You can set this up using a "Do a search for that references the current date and time and then adjusts the number of days by a negative number (ex 7 for a week). Below is an example of User’s created in the last 7 days, but the logic carries for point records.

In your case, you would change the setup to be Search for Point Records’s Given Amount:sum. (Which would sum up the count of points of all of the matching records). Note that you’d want to build out other constraints for the Given By, etc.

As you want to do more complex visualization, you’d want to make use of the “Group by” function (ex. create a bar chart that displays by day). [More info here](http://forum.bubble.io/t/new-feature-grouping-and-aggregating-data/27795).

 ![42%20PM](https://us1.discourse-cdn.com/bubble/original/3X/8/6/86ee3b4769801f3d653463c2df0d6318c87684ea.png)

Dan (creator of [LearnTo](https://learnto.app) - 115+ Bubble tutorials and [on-demand coaching](https://www.usesixty.com/users/841-dan-smolkin?m=true&r=841))

---

<div class="post-metadata">

**Author:** ![ryan10](https://avatars.discourse-cdn.com/v4/letter/r/97f17d/32.png) [@ryan10](https://forum.bubble.io/u/ryan10)\
**Post date:** [September 28, 2018, 9:06pm UTC](https://forum.bubble.io/t/solved-create-a-chart-showing-data-from-previous-week/38893/3 "2018-09-28T21:06:22Z")

</div>

Thank you, this is exactly what I was looking for! I will update after I play around with this a little bit.

Thanks again!

---

<div class="post-metadata">

**Author:** ![ryan10](https://avatars.discourse-cdn.com/v4/letter/r/97f17d/32.png) [@ryan10](https://forum.bubble.io/u/ryan10)\
**Post date:** [September 29, 2018, 12:56pm UTC](https://forum.bubble.io/t/solved-create-a-chart-showing-data-from-previous-week/38893/4 "2018-09-29T12:56:53Z")

</div>

It worked! Your link to the advanced grouping was very helpful, thanks again.

 ![23](https://us1.discourse-cdn.com/bubble/original/3X/b/3/b3e883b2161b555bb44395804b9b9f82ca8b30dc.jpeg)

---

<div class="post-metadata">

**Author:** ![dan1](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/dan1/32/23411_2.png) [@dan1](https://forum.bubble.io/u/dan1)\
**Post date:** [September 29, 2018, 2:40pm UTC](https://forum.bubble.io/t/solved-create-a-chart-showing-data-from-previous-week/38893/5 "2018-09-29T14:40:58Z")

</div>

Glad you were able to get it working, happy to help!
