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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Bhoobala_P
Frequent Visitor

Make Time slicer to appear with specific date range selected, for a published Power BI dashboard

I had created a dashboard with time slicer. My date ranges, say from 2011 to till date of 2016. I had published the dashboard into power bi. Let us assume that the date selected in the time slicer is 01/01/2016 and 15/12/2016. The data gets populated through live connection.

 

Hence when someone runs the dashboard on 17/12/2016, data till 16/12/2016 will be available to view. but the selected date will point to 01/01/2016 to 15/12/2016, instead of 01/01/2016 to 16/12/2016. In other words, the user has to manually adjust the date to set it to current year's date range till date.

 

My problem is that I want to automatically update the time slicer selected date. For instance, assume that data is available till 17/01/2017. Hence the current year is 2017 and the selected date should be from 01/01/2017 to 17/01/2017 in the time slicer for the user to view. Please note that data from other dates (2016) will also be available but the selection date of the slicer should point to starting date of the current year to current date of the current year.  Time Slicer Selected DateTime Slicer Selected Date

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Bhoobala_P,

In your scenario, create a calendar table and create relationship between calendar table and your original table.

Then create a new column using the following formula in the calendar table, create a slicer using the new column and select 1 as default value in the slicer. For more deatils, please review the example in this attached PBIX file.

Column = IF('Date'[Year]=YEAR(NOW())&& 'Date'[DateKey]<=TODAY()-1,1,0)
1.PNG

 

Thanks,
Lydia Zhang

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @Bhoobala_P,

In your scenario, create a calendar table and create relationship between calendar table and your original table.

Then create a new column using the following formula in the calendar table, create a slicer using the new column and select 1 as default value in the slicer. For more deatils, please review the example in this attached PBIX file.

Column = IF('Date'[Year]=YEAR(NOW())&& 'Date'[DateKey]<=TODAY()-1,1,0)
1.PNG

 

Thanks,
Lydia Zhang

BhaveshPatel
Community Champion
Community Champion

In that case,You should only use Year Column as a slicer instead of Dates. This should give you the results of the currrent year with current dates.

Thanks & Regards,
Bhavesh

Love the Self Service BI.
Please use the 'Mark as answer' link to mark a post that answers your question. If you find a reply helpful, please remember to give Kudos.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.