Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi All,
I have created a table like below.
Calendar=CALENDAR(DATE(2020,1,1),TODAY())
and I took date slicer and took between in settings.
Now my requirement is I need to show the default dates like start date as today()-1 and the end date as today()
Please let me know how to do this....
Solved! Go to Solution.
Thankyou, @parry2k, @Shubham_rai955, @MasonMA and @ajaybabuinturi for your responses.
Hi viswaaa,
Thank you for the follow up.
Based on my understanding, Power BI currently does not support setting a dynamic default date range such as Today()-1 to Today() directly in the Between slicer. When a measure based visual filter is applied, it restricts the slicer values to only those dates and disables manual selection.
To dynamically display Yesterday to Today by default while still allowing users to select any past dates, you can use one of the following approaches, which may help to resolve the issue:
Keep your calendar table.
Calendar = CALENDAR(DATE(2020, 1, 1), TODAY())
Add a Date slicer. Then go to the Format pane → Slicer settings → Options → Style = Relative. In the slicer dropdown, select Last, then 2, and finally Days. This automatically filters to Yesterday and Today and updates daily. Users can switch the slicer type to Between at any time to choose past dates.
If we want to keep the “Between” style visible, add two slicers using the same Calendar[Date]. One Relative slicer, which is set to Last 2 Days, should be hidden. One Between slicer should be visible to users. Sync both slicers and create a bookmark after setting the relative slicer. Set it as the Default View. This ensures the report opens with Yesterday–Today, but users can freely modify the visible Between slicer.
Additionally, kindly refer to the links provided below:
Create a relative date slicer or filter in Power BI - Power BI | Microsoft Learn
Create report bookmarks in Power BI - Power BI | Microsoft Learn
We hope the information provided helps to resolve the issue. Should you have any further queries, please feel free to contact the Microsoft Fabric community.
Thank you.
Hi @viswaaa,
If you require date selection and Y'day&T'day dates in same slicer it is NOT possible but there is a workaround using bookmarks. You need to use two buttons and and two slicers. When you click on Button1 you will get T'day and Y'day and when click on button2 you will get date selction.
Button1: T'day and Y'day dates
Button2: Date Selection
Slicer1 is having previous responce DAX logic which ensures that keep the slicer T'day and Y'day
Slicer2 is having complete date range with out DAX logic.
Use this video to set up this process: https://drive.google.com/file/d/1tsNcJ3F7P1Weq4goW52-NqcALwPkEuaE/view?usp=sharing
Thanks,
If you found this solution helpful, please consider giving it a Like👍 and marking it as Accepted Solution✔. This helps improve visibility for others who may be encountering/facing same questions/issues.
Hi viswaaa,
We are following up to see if what we shared solved your issue. If you need more support, please reach out to the Microsoft Fabric community.
Thank you.
Hi viswaaa,
We would like to follow up and see whether the details we shared have resolved your problem. If you need any more assistance, please feel free to connect with the Microsoft Fabric community.
Thank you.
Thankyou, @parry2k, @Shubham_rai955, @MasonMA and @ajaybabuinturi for your responses.
Hi viswaaa,
Thank you for the follow up.
Based on my understanding, Power BI currently does not support setting a dynamic default date range such as Today()-1 to Today() directly in the Between slicer. When a measure based visual filter is applied, it restricts the slicer values to only those dates and disables manual selection.
To dynamically display Yesterday to Today by default while still allowing users to select any past dates, you can use one of the following approaches, which may help to resolve the issue:
Keep your calendar table.
Calendar = CALENDAR(DATE(2020, 1, 1), TODAY())
Add a Date slicer. Then go to the Format pane → Slicer settings → Options → Style = Relative. In the slicer dropdown, select Last, then 2, and finally Days. This automatically filters to Yesterday and Today and updates daily. Users can switch the slicer type to Between at any time to choose past dates.
If we want to keep the “Between” style visible, add two slicers using the same Calendar[Date]. One Relative slicer, which is set to Last 2 Days, should be hidden. One Between slicer should be visible to users. Sync both slicers and create a bookmark after setting the relative slicer. Set it as the Default View. This ensures the report opens with Yesterday–Today, but users can freely modify the visible Between slicer.
Additionally, kindly refer to the links provided below:
Create a relative date slicer or filter in Power BI - Power BI | Microsoft Learn
Create report bookmarks in Power BI - Power BI | Microsoft Learn
We hope the information provided helps to resolve the issue. Should you have any further queries, please feel free to contact the Microsoft Fabric community.
Thank you.
Hi @viswaaa,
I agree with everyone answers but there is workaround to get Start Date as Y'day and End Date as T'day. You can gothrough the below mentioned steps to achive it.
1. I belive you a Calendar Table
Calendar = CALENDAR(DATE(2020,1,1), TODAY())2. Then create a Dynamic Default Date Range measure which ensures that will return a logical condition (TRUE/FALSE) based on whether the current date falls within the desired default range (TODAY()-1 to TODAY())
DefaultDateRangeFlag =
Var StartDate = TODAY() - 1
Var EndDate = TODAY()
Var Result =
IF(MIN(Calendar[Date]) >= StartDate && MAX(Calendar[Date]) <= EndDate, 1, 0)
RETURN
Result3. Then add this Dynamic Default Date Range measure to the Date slicer visual level filter and set the value equal / is to "1"
Finally you can able to see dynamic dates but keep in mind it won't allow you to modify the dates as per your requirement except T'day and Y'day. It will always show the dates as per our DAX logic, Start Date as Y'day and End Date as T'day
Let me know if you have any questions.
Thanks,
If you found this solution helpful, please consider giving it a Like👍 and marking it as Accepted Solution✔. This helps improve visibility for others who may be encountering/facing same questions/issues.
Hi Ajay,
But I want to select past dates also if required which is disabled now.
How to get that enable ?
Hi @viswaaa,
If you require date selection and Y'day&T'day dates in same slicer it is NOT possible but there is a workaround using bookmarks. You need to use two buttons and and two slicers. When you click on Button1 you will get T'day and Y'day and when click on button2 you will get date selction.
Button1: T'day and Y'day dates
Button2: Date Selection
Slicer1 is having previous responce DAX logic which ensures that keep the slicer T'day and Y'day
Slicer2 is having complete date range with out DAX logic.
Use this video to set up this process: https://drive.google.com/file/d/1tsNcJ3F7P1Weq4goW52-NqcALwPkEuaE/view?usp=sharing
Thanks,
If you found this solution helpful, please consider giving it a Like👍 and marking it as Accepted Solution✔. This helps improve visibility for others who may be encountering/facing same questions/issues.
Hi, instead of 'Between slicer' type, try switching to Relative:
This automatically filters your report to Yesterday and Today by default and it updates daily.
@Shubham_rai955, every other solution without default settings is not scalable, especially bookmarks. I will refrain from such solutions. Good try though 👍
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
To set a default date slicer with start date as today minus one and end date as today in Power BI, you need to create two measures and use slicer sync or bookmarks.
Create your calendar table as:
Create two measures:
Add a slicer visual using the Calendar table date.
To auto-select dates, use slicer bookmarks or set the default values via a filter on the slicer:
Filter the slicer to show between StartDateDefault and EndDateDefault.
Save this view as a bookmark and set it as default (optional, requires manual action).
Power BI does not currently support dynamic default date selection directly in the slicer, but these steps provide a practical approach using measures and bookmarks.
Can you please elaborate on this.
After creating measure what I need to do with book marks can you please guide me
@viswaaa, there is no direct way to set default values in the slicers; this is one of the big asks for the slicers.
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 38 | |
| 38 | |
| 36 | |
| 28 | |
| 28 |
| User | Count |
|---|---|
| 124 | |
| 88 | |
| 74 | |
| 66 | |
| 65 |