Views: Ranking users by pageviews this month, last month
Take a look at the "archive" example view, which is provided by default (though disabled) as part of the views module.  It can be found under "Archive" on the admin/structure/views page.

This view groups the content created on the site by year and month; the contextual filter, filter criteria, and sort criteria are already configured and working correctly.  Study this example view and hopefully it will help you create what you want to do.