Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
shishanki
Regular Visitor

Setting default value for 'between' (start and end date) date slicer

I need a date slicer (between-mode) that selects the most recent 24 houra data by default... while still allowing end-users to pick any other period (for both start and end dates).

 

From what I've seen, this is impossible to accomplish in PowerBI. Is that true?

Please help

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @shishanki ,

 

As far as I know, Power BI doesn't support us to set default date in slicer currently.

Your demand is a good idea, while it is not supported to implement in Power BI currently.
You can vote up this idea for this function:Set default date in slicer
Or you can submit a new idea to improve the Power BI.
It is a place for customers provide feedback about Microsoft Office products . What’s more, if a feedback is high voted there by other customers, it will be promising that Microsoft Product Team will take it into consideration when designing the next version in the future.

 

There is a workaround to achieve your goal by unrelated DimDate table and measure. By this way, you need to create two unrelated date tables for rangestart and rangeend.

My Sample:

RicoZhou_0-1676535891061.png

Data model:

RicoZhou_1-1676535901743.png

Measure:

Filter M = 
VAR _RANGESTART =
    SELECTEDVALUE ( RangeStart[Date] )
VAR _RANGEEND =
    SELECTEDVALUE ( RangeEnd[Date] )
VAR _CURRENTDATE =
    MAX ( 'Table'[Date] )
RETURN
    IF (
        ISFILTERED ( RangeStart[Date] ) && ISFILTERED ( RangeEnd[Date] ),
        IF ( _CURRENTDATE >= _RANGESTART && _CURRENTDATE <= _RANGEEND, 1, 0 ),
        IF ( _CURRENTDATE = TODAY (), 1, 0 )
    )

Add this measure into visual level filter and set it to show items when value =1.

RicoZhou_2-1676535937644.png

RicoZhou_3-1676535961411.png

 

Best Regards,
Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
shishanki
Regular Visitor

Any help will be appreciated.

Anonymous
Not applicable

Hi @shishanki ,

 

As far as I know, Power BI doesn't support us to set default date in slicer currently.

Your demand is a good idea, while it is not supported to implement in Power BI currently.
You can vote up this idea for this function:Set default date in slicer
Or you can submit a new idea to improve the Power BI.
It is a place for customers provide feedback about Microsoft Office products . What’s more, if a feedback is high voted there by other customers, it will be promising that Microsoft Product Team will take it into consideration when designing the next version in the future.

 

There is a workaround to achieve your goal by unrelated DimDate table and measure. By this way, you need to create two unrelated date tables for rangestart and rangeend.

My Sample:

RicoZhou_0-1676535891061.png

Data model:

RicoZhou_1-1676535901743.png

Measure:

Filter M = 
VAR _RANGESTART =
    SELECTEDVALUE ( RangeStart[Date] )
VAR _RANGEEND =
    SELECTEDVALUE ( RangeEnd[Date] )
VAR _CURRENTDATE =
    MAX ( 'Table'[Date] )
RETURN
    IF (
        ISFILTERED ( RangeStart[Date] ) && ISFILTERED ( RangeEnd[Date] ),
        IF ( _CURRENTDATE >= _RANGESTART && _CURRENTDATE <= _RANGEEND, 1, 0 ),
        IF ( _CURRENTDATE = TODAY (), 1, 0 )
    )

Add this measure into visual level filter and set it to show items when value =1.

RicoZhou_2-1676535937644.png

RicoZhou_3-1676535961411.png

 

Best Regards,
Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.