Weekly, Monthly Leaderboard

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 :slight_smile:

How should I proceed? :slight_smile:

This might help:

2 Likes

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


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?

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?

Well, it seems that I’m hardcoding it :smiley:

How do I make a log?

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.

Could you please explain the multiple relation part?

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.

Yep. That’s what I meant

1 Like

So far I understand (I think) :smiley:

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

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

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

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”.

Exactly! I know I should, but I dont know how :smiley:

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).

Ok, so:
I have a log of activities:

In the Users sheet I made a relation column with multiple matches of emails:
image

And then calculated the points for that user using rollup:

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 :slight_smile:

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:

2 Likes

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

1 Like