First, create an achievement for the individual action you'd like to use (eg if it's for a 10 closed deals in a day, then you would create an achievement that will trigger every time a deal is closed).
To learn more about creating achievements, please see this article.
Next, create a badge that gets awarded for triggering the initial achievement the desired number of times within the desired interval.
For instance, if it's for closing 10 deals in a day, then configure the badge to be automatically awarded when the achievement for closing a deal is triggered 10 times in one day.
To learn more about badges and how to create them, see this article
Finally, create a badge achievement whenever a user earns this badge.
To learn more about how to create badge achievements, see this article.