We have applied filters based on Boolean line items to accomplish this in the past. This can be accomplished with a system module to create the needed filters that you will then apply to the modules on your dashboard. The drawback of this approach is that in order for your dashboard to refilter based on the input selection it must be refreshed (filters don't auto-refresh based on a change in input).
How to create filter module:
Step 1 - Create an input line where Boolean is checked if you want to view years only (no time dimension)
Step 2 - Create line dimensioned by Year and reference line created in Step 1
Step 3 - Create line dimensioned by Month and reference the inverse of Step 2 (i.e. input NOT true)
Step 4 - Create module dimensioned by Month and bring together Steps 1 and 2 *Ensure the summary method is set to Formula
***If you want this filter to be user specific, ensure you are dimensioning the module by Users