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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonymous
Not applicable

Creating dynamic time periods that update automatically

Dear Power BI- Community,

 

I am struggeling with following task:

 

I would like to (or more or less have to) create a dynamic time slicer, that only shows the past half year and will continue to do so. So, of today the time period shown will be 4th of Jan - 4th of July, tomorrow this shall be updated to 5th of Jan to 5th of July and so on...

 

How can I go about this?

Any hint or help will be greatly appreciated!

 

Thanks a lot 🙂 

1 ACCEPTED SOLUTION
tex628
Community Champion
Community Champion

The table expression is evaluated each time the report is updated which means that the TODAY() syntax will return the the current day when the report is updated. This means that if you want this to return the correct range you need to have the report on a scheduled refresh once every day. Apart from that there shouldent be anything else to worry about!


Connect on LinkedIn

View solution in original post

3 REPLIES 3
tex628
Community Champion
Community Champion

I would recommend creating a calendar that only holds that specific interval, 

TABLE = CALENDAR(DATE(YEAR(TODAY()) , MONTH(TODAY())-6 , DAY(TODAY())) , TODAY())
Add a relationship and the use it with a slicer.

Connect on LinkedIn
Anonymous
Not applicable

Thanks for the hint.

So tomorrow with the data refresh, this table will be automatically updated, too? Or are there further steps required?

tex628
Community Champion
Community Champion

The table expression is evaluated each time the report is updated which means that the TODAY() syntax will return the the current day when the report is updated. This means that if you want this to return the correct range you need to have the report on a scheduled refresh once every day. Apart from that there shouldent be anything else to worry about!


Connect on LinkedIn

Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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