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

Get Fabric Certified for FREE during AI Skills Fest. This week only. Secure your voucher now.

Reply
AliAkbariyanBss
New Member

Dynamic calendar

Hi everyone!
I’m facing an issue with the calendar in my Power BI report.

I have a date slicer that lets users select a specific date. When a date is selected, a line chart shows the sales for that day and for the same day in the previous year — which works fine.

The challenge:
I want the slicer to default to today’s date (TODAY()) when the report is opened, so users immediately see today’s sales compared to the same day last year. However, I also want users to be able to navigate forward and backward in time using the slicer — and see the corresponding data for each selected date and its equivalent from the previous year.

Any ideas on how to achieve this? Thanks in advance!

1 ACCEPTED SOLUTION
speedramps
Super User
Super User

yes it will work with past, current or future dates.

Please watch the video and try.

This solution works.
Please be noice and accept the solution and click the thumbs up.

 

Create a test table

Calendar = 
CALENDAR(TODAY()-10,TODAY()+10)

 

A calculated column

Pick date = 
IF('Calendar'[Date] = TODAY(), "Current date", FORMAT('Calendar'[Date],"DD/MM/YYYY"))

 

Sort the pick date by the date

 

And add the pick date to your slicer

speedramps_1-1749126089234.png

 

View solution in original post

7 REPLIES 7
v-achippa
Community Support
Community Support

Hi @AliAkbariyanBss,

 

Thank you for reaching out to Microsoft Fabric Community.

 

Thank you @speedramps and @pankajnamekar25 for the prompt response.

 

As we haven’t heard back from you, we wanted to kindly follow up to check if the solution provided by the user resolved your issue? or let us know if you need any further assistance. 

If any response resolved your issue, please mark it as "Accept as solution" and click "Yes" if you found it helpful.

 

Thanks and regards,

Anjan Kumar Chippa

Hi @AliAkbariyanBss,

 

As we haven’t heard back from you, we wanted to kindly follow up to check if the solution provided by the user resolved your issue.

If any response resolved your issue, please mark it as "Accept as solution" and click "Yes" if you found it helpful.

 

Thanks and regards,

Anjan Kumar Chippa

Hi @AliAkbariyanBss,

 

We wanted to kindly follow up to check if the solution provided by the user resolved your issue.

If any response resolved your issue, please mark it as "Accept as solution" and click "Yes" if you found it helpful.

 

Thanks and regards,

Anjan Kumar Chippa

speedramps
Super User
Super User

yes it will work with past, current or future dates.

Please watch the video and try.

This solution works.
Please be noice and accept the solution and click the thumbs up.

 

Create a test table

Calendar = 
CALENDAR(TODAY()-10,TODAY()+10)

 

A calculated column

Pick date = 
IF('Calendar'[Date] = TODAY(), "Current date", FORMAT('Calendar'[Date],"DD/MM/YYYY"))

 

Sort the pick date by the date

 

And add the pick date to your slicer

speedramps_1-1749126089234.png

 

pankajnamekar25
Super User
Super User

Hello @AliAkbariyanBss 

 

Explore this solution from community

 

Solved: Set default date to today on date slicer - Microsoft Fabric Community

Thanks,
 Pankaj Namekar | LinkedIn

If this solution helps, please accept it and give a kudos (Like), it would be greatly appreciated.

speedramps
Super User
Super User

Try this ...

https://www.youtube.com/watch?v=VaJ10ilXp6Y&pp=0gcJCdgAo7VqN5tD

 

Please be nice and click the [thumbs up] because I tried to help you,
and [accept solution button] if it works. Thank you !

 

 

Thanks for your help but it didnt solve my problem because with this logic you cant see the upcoming dates! 

Helpful resources

Announcements
May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.