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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
TomerIwanir1
Helper I
Helper I

Dynamic date filter

Hi All,

 

I'm using Slicer visual in order to slice and dice dates :

TomerIwanir1_0-1736365339682.png

 

I want to set the filter to  auto update daily to show the dates of: (Today - 7) until (today - 1)

 

what should I set in the filter section:

 

TomerIwanir1_1-1736365497475.png

 

 

Thanks !

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @TomerIwanir1 ,

 

Thanks for the reply from lbendlin .

 

Create a measure to determine the range:

IsInRange = 
VAR TodayDate = TODAY()
RETURN
IF(
    MAX('Table'[Date]) >= TodayDate - 7 && MAX('Table'[Date]) < TodayDate,
    1,
    0
)

 

Drag IsInRange into the Filter and set the condition to IsInRange = 1.

vhuijieymsft_0-1736387621016.png

 

The final visual effect is shown below:

vhuijieymsft_1-1736387621021.png

 

The pbix file is attached.

 

If you have any other questions please feel free to contact me.

 

Best Regards,
Yang
Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @TomerIwanir1 ,

 

Thanks for the reply from lbendlin .

 

Create a measure to determine the range:

IsInRange = 
VAR TodayDate = TODAY()
RETURN
IF(
    MAX('Table'[Date]) >= TodayDate - 7 && MAX('Table'[Date]) < TodayDate,
    1,
    0
)

 

Drag IsInRange into the Filter and set the condition to IsInRange = 1.

vhuijieymsft_0-1736387621016.png

 

The final visual effect is shown below:

vhuijieymsft_1-1736387621021.png

 

The pbix file is attached.

 

If you have any other questions please feel free to contact me.

 

Best Regards,
Yang
Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

lbendlin
Super User
Super User

Use the "Relative Dates"  filter type instead, and choose "In the last 7 days".

Helpful resources

Announcements
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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