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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
Anonymous
Not applicable

Need a way for date in between slicer to dynamically change to and from dates

Hi folks,

I am working on a huge dashboard and have many slicers on the report page. I have 2 slicers on top that are as below:
1. Week ending with date

revolutionpbi_1-1689788002751.png

 


2. Weeks before the week ending date

revolutionpbi_0-1689787951628.png


I need another slicer below for one of my bar chart visuals which will show only dates that will be within the date range selected above. I have the slicer as below but the dates is all dates from the date table:

revolutionpbi_2-1689788183029.png

I use the below measure to filter the slicer 

 

 

dateBetween = 
VAR selected = SELECTEDVALUE('Calendar'[Date])
VAR C = CALCULATE(SWITCH(SELECTEDVALUE('Period Length'[Periodlength]), "4 weeks",  28 , "52 weeks", 364, "1 week", 7, "104 weeks",728 , "24 weeks", 168, "26 weeks", 182, "12 weeks", 84)) 
VAR minDate = selected - C
RETURN 
    IF (
        SELECTEDVALUE ( 'Static Calendar'[Date] ) <= selected
            && SELECTEDVALUE ( 'Static Calendar'[Date]) >= minDate,
        1,
        0
    )

 

 

This works on a vertical list of values in slicer but doesn't work on Between dates slicer screenshot below:

revolutionpbi_3-1689788512375.png

Is there a way it will show the start date and end date in the slicer in between date format?

Thanks for you help!



1 ACCEPTED SOLUTION
Ritaf1983
Super User
Super User

Hi @Anonymous 
This happens because to have a slicer as range you need to have all days between the range.

Only single-level consecutive numbers/dates are supported.
It does not work on "torn" sequences

Therefore, it will work on 1,2,3,4,5
However, it will not work on 1,3,5
The same thing for dates.

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

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

View solution in original post

1 REPLY 1
Ritaf1983
Super User
Super User

Hi @Anonymous 
This happens because to have a slicer as range you need to have all days between the range.

Only single-level consecutive numbers/dates are supported.
It does not work on "torn" sequences

Therefore, it will work on 1,2,3,4,5
However, it will not work on 1,3,5
The same thing for dates.

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

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors
Top Kudoed Authors