Sorting for a leaderboard

Hey Bubblers,

I am currently building which has a leaderboard page.

Each member is rewarded points when he takes specific actions. At the very start, I only had a ‘karma score’ field where I would had x points in the respective workflows.
I have no problem sorting the 'All time" leaderbord with the total ‘karma score’.

But now I would like to refine the leaderboard and show the best from the past x day or x weeks for example. To do so, I created a new data type ‘karma points’. So every time a member triggers a workflow which rewards points, it creates a ‘karma points’ thing and link the user to it. I am thinking this is the way to structure the DB and I will be able to filter by the created date of the ‘karma points’ things.
Now, the problem is that I cannot figure out the sorting of said leaderboard for past 7 days (an example). I feel like the dynamic sorting is where it should happen but I haven’t been able to find the solution.

Would really appreciate if you have some solutions for me

This topic was automatically closed after 70 days. New replies are no longer allowed.