Drop down filter for YTD, Current Month and Current Week

This type of a problem is VERY easily solved with @Melissa’s Magnificent Date Table (and if you are not using it, I highly recommend)

with that table in place, we only need to filter on the month offset (0 = current month)

Current Mth (month offset) = 
CALCULATE( [Total Sales],
    FILTER( Dates, Dates[MonthOffset] = 0 ))

But, if that is not possible (although again, I highly recommend the switch), then you can try something like this:

Current Mth (Filtered Calendar) = 
VAR _StartMonth = DATE( YEAR(TODAY()), MONTH(TODAY()), 1)
VAR _Current = TODAY()
RETURN
    CALCULATE( [Total Sales], 
        FILTER( Dates, 
            Dates[Date] >= _StartMonth && Dates[Date] <= _Current ))

Note that these methods both specifically force to the CURRENT MONTH - your user won’t have the option to select a different month (for that you would need to identify the selected month and use that in the variables above).

updated copy is attached
Filter by YTD or MTD with a slicer.pbix (389.1 KB)

2 Likes