Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Default Date Filters

Hi all

 

I have some date filters, I need to be able to select explit ranges (e.g. 5th Feb to 27th Feb)

 

However, I would like these to be defaulted to last calendar month? Is this possible? Seems like an obvious thing to do, but cannot see an easy way of doing it other than having a secondary date range table.

 

Relative date filters are good, but you then lose the ability to select an exact date range

 

Thanks

  • Hi Anonymous ,

     

    We can create a calculated column to work around.

    Column = 
    VAR thismnonth =
        FORMAT ( TODAY (), "mmmyyyy" )
    RETURN
        IF (
            FORMAT ( 'CALENDAR'[Date], "mmmyyyy" ) = thismnonth,
            "this month",
            "" & 'CALENDAR'[Date]
        )
    

    Capture.PNG

1 Reply

  • v-frfei-msft's avatar
    v-frfei-msft
    Community Support

    Hi Anonymous ,

     

    We can create a calculated column to work around.

    Column = 
    VAR thismnonth =
        FORMAT ( TODAY (), "mmmyyyy" )
    RETURN
        IF (
            FORMAT ( 'CALENDAR'[Date], "mmmyyyy" ) = thismnonth,
            "this month",
            "" & 'CALENDAR'[Date]
        )
    

    Capture.PNG