How to Default Slicer End Date to always be last date in data

Hello!

I have a few clients that are requesting data slicers that default the end date to be the most current date in the data. Currently, I have filters on these slicers using the “Relative” type filter where it gives us the last 6 months of data. These datasets are refreshing multiple times per day so the most current date is always the current date.

When I look at these reports the default end date in the slicer is not defaulting to be the current date. Below is a screen shot of what I am referring too. Also, they would like to use the “between” logic in the slicer and not the “relative” logic so they can pick date ranges and not be stuck to grabbing the last x amount of days or months. Any help or guidance is appreciated, Thanks!

HI @Preston,

Have a look at this video.

You can also try this trick

Regards,
Harsh Nathani

Hi @Preston,

Welcome to the Forum!

Think the most simple way to achieve this is to drag a boolean filter like “IsAfterToday” to the Page Level Filter section in the Filter Pane and set that to FALSE.

You can add that logic to your Date table or use the Extended one you can find here.

I hope this is helpful.

Thanks for the quick reply. I am able to get the last date of the data using this measure below. However, how do use this measure in conjunction with a slicer that allows me to select a date range? I am using a between slicer on the date field.

Date Harvest Max = 
    CALCULATE(
        MAX( AR_InvoiceHistoryDetail[Date] ),
        ALLSELECTED( AR_InvoiceHistoryDetail[Date] )
    )

Please be sure to check out our DAX Clean Up tool it’s a great way to ensure to make your DAX code easy to read. Thanks!

https://analysthub.enterprisedna.co/dax-clean-up