Hi to all, I'm trying to create a view which shows the userpoints users have earned in the last month. So far, I had no success. I can use a filter to filter the transactions of the last month but can't count the corresponding userpoints. Any suggestions? Is this possible or should I write my own query, counting the points of the user in the past month?

Comments

berdir’s picture

I think Views 6.x-3.x has support for GROUP BY. That means you could group all transactions per user and only show the total.

cptX’s picture

Maybe, but I'm using views 2.

berdir’s picture

Status: Active » Fixed

Well, you will either need to switch to Views 3 or write a custom query. You can start with the query in userpoints_get_current_points() and then add the timestamp condition.

These are your options.

cptX’s picture

Thanks Berdir, I followed your advise and installed views 3 alpha. Thanks God all my views are working without any change! I finally managed to group the user points by the timestamp of the userpoints transactions. Many many thanks!!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

amsterdamdrupalnewbie’s picture

Hi - I am looking to do exactly the same (count user points for this month and last month) any chance you can tell me how you did it / do it? Thanks a lot!

play4quarters’s picture

I'm am wondering how I should structure the filter on the time stamp of the userpoint transaction to reflect the last month. Using Drupal 7, Views 3.

I've tried = last month and = this month without success...so I'm sure it's something I'm not understanding completely.

Any assist would be greatly appreciated.

Thanks