# Create Date Slicers for Pre-defined time frame (MTD & YTD)



## Vexorg (Sep 11, 2013)

Hello,

I am creating a report that tracks time sensitive items.

I am having trouble create a slicer for Month-to-date and Year-to-date.  Has anyone ever done something similar?

Thanks


----------



## StrafeXL (Sep 12, 2013)

I used the method linked below to create a slicer that switches between previous month, quarter-to-date and year-to-date. Basically you create multiple measures, then a 'selection' measure that uses a switch statement to choose which measure to display.

Measure Selection using Slicers in PowerPivot | Some Random Thoughts


----------

