# Weekly, Monthly Leaderboard

**URL:** <https://community.glideapps.com/t/weekly-monthly-leaderboard/60091>\
**Category:** Ask for Help\
**Created:** [April 3, 2023, 8:39pm UTC](https://community.glideapps.com/t/weekly-monthly-leaderboard/60091 "2023-04-03T20:39:05Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![Michal\_Filicko](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/michal_filicko/32/56806_2.png) [@Michal\_Filicko](https://community.glideapps.com/u/Michal_Filicko)\
**Post date:** [April 3, 2023, 8:39pm UTC](https://community.glideapps.com/t/weekly-monthly-leaderboard/60091/1 "2023-04-03T20:39:05Z")

</div>

Hi guys, I’m making a simple app where sales people can track their number of calls and appointments every day, but I think I started the wrong way.

I added a button “I made a call” which increments the number of calls by 1 and number of points by a random number between 90-110.

Same button I made an appointment which increments number of appointments by 1 and number of points by 1000.

We tested the app with the team and collected a whole lot of data.

Now I would like to make a leaderboard for week and month, but I’m stuck with absolute number of calls, points and numbers of appointments, and i would not like to lose the data 🙂

How should I proceed? 🙂

---

<div class="post-metadata">

**Author:** ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)\
**Post date:** [April 3, 2023, 9:12pm UTC](https://community.glideapps.com/t/weekly-monthly-leaderboard/60091/2 "2023-04-03T21:12:59Z")

</div>

This might help:

> [@How To: Build a Gamified Glide App (updated 10/6/20)](https://community.glideapps.com/t/how-to-build-a-gamified-glide-app-updated-10-6-20/13102):
>
> Learn to create a gamified Glide app from scratch! Complete with XP, in-app currency, ranks, progress bars, guilds, challenges, inventory and item stores. Part 1: Create your spreadsheet, design an onboarding experience, set up user profiles, and add users to guilds! [[Gamify your Glide App #1: Onboarding, User Profiles and Guilds] ](https://www.youtube.com/watch?v=2RrwaKKcm00)

---

<div class="post-metadata">

**Author:** ![Michal\_Filicko](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/michal_filicko/32/56806_2.png) [@Michal\_Filicko](https://community.glideapps.com/u/Michal_Filicko)\
**Post date:** [April 3, 2023, 9:30pm UTC](https://community.glideapps.com/t/weekly-monthly-leaderboard/60091/3 "2023-04-03T21:30:52Z")

</div>

Hi Robert! Thank you very much for the detailed guide 🙂 I think I watched all of your videos regarding the leaderboards, I even used your guide to build my first leaderboard.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/4/2/423cc34c502d148447f19d5b3a1fedf09e462539.png)  
What I’m struggling with is that I didnt think I will need a weekly leaderboard from the start. Should I add another column with Weekly Points, Monthly points etc?

And if yes, how do I reset it after the week ends?

---

<div class="post-metadata">

**Author:** ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)\
**Post date:** [April 3, 2023, 9:50pm UTC](https://community.glideapps.com/t/weekly-monthly-leaderboard/60091/4 "2023-04-03T21:50:08Z")

</div>

Awesome! I gotcha. Unless you’re capturing new point rewards in a log and capturing the timestamp of the reward, this will prove to be impossible. Are you capturing points in a log or hardcoding their points via increments?

---

<div class="post-metadata">

**Author:** ![Michal\_Filicko](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/michal_filicko/32/56806_2.png) [@Michal\_Filicko](https://community.glideapps.com/u/Michal_Filicko)\
**Post date:** [April 3, 2023, 10:01pm UTC](https://community.glideapps.com/t/weekly-monthly-leaderboard/60091/5 "2023-04-03T22:01:30Z")

</div>

Well, it seems that I’m hardcoding it 😃

How do I make a log?

---

<div class="post-metadata">

**Author:** ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)\
**Post date:** [April 3, 2023, 11:42pm UTC](https://community.glideapps.com/t/weekly-monthly-leaderboard/60091/6 "2023-04-03T23:42:46Z")

</div>

Instead of using increments to user profile, you’d write those values to a log along with a user ID and timestamp. Then you’d use a multiple relation from users table to log table and Rollup the point values. Only issue is that this setup will certainly eat into your row quota.

---

<div class="post-metadata">

**Author:** ![Michal\_Filicko](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/michal_filicko/32/56806_2.png) [@Michal\_Filicko](https://community.glideapps.com/u/Michal_Filicko)\
**Post date:** [April 9, 2023, 11:13pm UTC](https://community.glideapps.com/t/weekly-monthly-leaderboard/60091/7 "2023-04-09T23:13:19Z")

</div>

Could you please explain the multiple relation part?

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [April 9, 2023, 11:50pm UTC](https://community.glideapps.com/t/weekly-monthly-leaderboard/60091/8 "2023-04-09T23:50:53Z")

</div>

Robert meant you should do a multiple relation using the “user ID” value.

In the original table where you store all users, use a relation from the “RowID” column to the “user ID” column in the newly created Logs table, and make it a multiple relation.

Then, you use a rollup column to get the total points.

---

<div class="post-metadata">

**Author:** ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)\
**Post date:** [April 9, 2023, 11:55pm UTC](https://community.glideapps.com/t/weekly-monthly-leaderboard/60091/9 "2023-04-09T23:55:24Z")

</div>

Yep. That’s what I meant

---

<div class="post-metadata">

**Author:** ![Michal\_Filicko](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/michal_filicko/32/56806_2.png) [@Michal\_Filicko](https://community.glideapps.com/u/Michal_Filicko)\
**Post date:** [April 10, 2023, 12:00am UTC](https://community.glideapps.com/t/weekly-monthly-leaderboard/60091/10 "2023-04-10T00:00:06Z")

</div>

So far I understand (I think) 😃

But how should I filter the items that were created on week 14, for example? And count only those items?

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [April 10, 2023, 12:01am UTC](https://community.glideapps.com/t/weekly-monthly-leaderboard/60091/11 "2023-04-10T00:01:36Z")

</div>

What’s your use case for filtering “Week 14”? Is it something you want users to filter on the front end?

---

<div class="post-metadata">

**Author:** ![DarrenHumphries](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darrenhumphries/32/91715_2.png) [@DarrenHumphries](https://community.glideapps.com/u/DarrenHumphries)\
**Post date:** [April 10, 2023, 12:05am UTC](https://community.glideapps.com/t/weekly-monthly-leaderboard/60091/12 "2023-04-10T00:05:18Z")

</div>

You can use a math column to get weeknum or can use date formating column, if that helps.

---

<div class="post-metadata">

**Author:** ![Michal\_Filicko](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/michal_filicko/32/56806_2.png) [@Michal\_Filicko](https://community.glideapps.com/u/Michal_Filicko)\
**Post date:** [April 10, 2023, 12:06am UTC](https://community.glideapps.com/t/weekly-monthly-leaderboard/60091/13 "2023-04-10T00:06:05Z")

</div>

I just want to show 3 leaderboards: All time points gained, Weekly points gained and Monthly points gained.

Those leaderboards should reset on given time period, I dont want to see “last 7 days”.

---

<div class="post-metadata">

**Author:** ![Michal\_Filicko](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/michal_filicko/32/56806_2.png) [@Michal\_Filicko](https://community.glideapps.com/u/Michal_Filicko)\
**Post date:** [April 10, 2023, 12:06am UTC](https://community.glideapps.com/t/weekly-monthly-leaderboard/60091/14 "2023-04-10T00:06:46Z")

</div>

Exactly! I know I should, but I dont know how 😃

---

<div class="post-metadata">

**Author:** ![DarrenHumphries](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darrenhumphries/32/91715_2.png) [@DarrenHumphries](https://community.glideapps.com/u/DarrenHumphries)\
**Post date:** [April 10, 2023, 12:09am UTC](https://community.glideapps.com/t/weekly-monthly-leaderboard/60091/15 "2023-04-10T00:09:00Z")

</div>

You need to have a related table, as was mentioned, and record the date for the points. Then one of those two methods to calculate the week number and then you can compare to current week number to show the age (how many weeks ago).

---

<div class="post-metadata">

**Author:** ![Michal\_Filicko](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/michal_filicko/32/56806_2.png) [@Michal\_Filicko](https://community.glideapps.com/u/Michal_Filicko)\
**Post date:** [April 10, 2023, 12:28am UTC](https://community.glideapps.com/t/weekly-monthly-leaderboard/60091/16 "2023-04-10T00:28:25Z")

</div>

Ok, so:  
I have a log of activities:

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/d/c/dc73e6ca37a52aec46e525d5fbc4eff7bd5ea6bb.png)

In the Users sheet I made a relation column with multiple matches of emails:  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/7/3/736fbed8dfbef26c127e4bc3ab4a61cc3947bc40.png)

And then calculated the points for that user using rollup:

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/9/b/9bc19320428f9b2809e2b11b9e0e29a4299535e8.png)

But that shows all the points - where should I insert the step to filter the creation week? And how?

Sorry for the lame explanation, its 2AM in my timezone 🙂

---

<div class="post-metadata">

**Author:** ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)\
**Post date:** [April 10, 2023, 1:44am UTC](https://community.glideapps.com/t/weekly-monthly-leaderboard/60091/17 "2023-04-10T01:44:16Z")

</div>

Follow my rankings video below, but before you create the points arrays, you’ll need to create a multiple relation column that relates the week number back to itself. This will isolate each set of values to their respective week. Then use a look up column to get the points array for each week.

described here:

> [@1st\_place\_medal2nd\_place\_medal3rd\_place\_medal Convert Number Score to Rankings in Glide!](https://community.glideapps.com/t/convert-number-score-to-rankings-in-glide/34103/20):
>
> Nah. Just create a multiple relation from the category back to itself. Then, the very first lookup column will be based off the relation column and not just the sheet column.

[![](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/8/5/85d52dfc2c6fa59b69ebf006cb6cad7d5e3e8944.jpeg "Glide: Create a RANKED Leaderboard!") ](https://www.youtube.com/watch?v=QvNTzYx7tvI)

---

<div class="post-metadata">

**Author:** ![Lucas\_Malguy1](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/lucas_malguy1/32/54607_2.png) [@Lucas\_Malguy1](https://community.glideapps.com/u/Lucas_Malguy1)\
**Post date:** [April 10, 2023, 8:29pm UTC](https://community.glideapps.com/t/weekly-monthly-leaderboard/60091/18 "2023-04-10T20:29:44Z")

</div>

hi @Michal_Filicko

> But that shows all the points - where should I insert the step to filter the creation week? And how?

You could add intermediate columns in your log tab as filters. For the weekly points, you could add a IF THEN ELSE column:

- IF date of log IS this week THEN → “display points” OTHERWISE “leave empty”
- In your rollup in the user tab, instead of using all users log from the relation, use this new “if then else” column. It will only do the sum of the weekly log

You can do the same for monthly.

To know if a log is in this week or month you’ll have to add 2 columns, “CurrentWeek” and “CurrentMonth” using math columns. You then use these in your intermediates columns
