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!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
How can i keep default dates selection as current month dates in slicer visual
Note - Start date should be 1st of the current month but end date has to be dates till the data is available in current month
@Abhilash_P , Currently there is no configuration to do it directly
You can use a date table and create measure for Start and End dates
StartOfMonth =
DATE(YEAR(TODAY()), MONTH(TODAY()), 1)
EndOfMonth =
CALCULATE(
MAX('YourDataTable'[DateColumn]),
FILTER(
'YourDataTable',
YEAR('YourDataTable'[DateColumn]) = YEAR(TODAY()) &&
MONTH('YourDataTable'[DateColumn]) = MONTH(TODAY())
)
)
Then
Create a Slicer: Add a slicer visual to your report and set it to use the date column from your date table.
Set Default Values Using Bookmarks: To set the default values for the slicer, you can use bookmarks and the relative date filtering feature.
First, set the slicer to the desired default range manually:
Set the start date to the 1st of the current month.
Set the end date to the latest available date in the current month.
Create a bookmark with this slicer state:
Go to the "View" tab and open the "Bookmarks" pane.
Click "Add" to create a new bookmark and name it (e.g., "DefaultDateRange").
Use the Bookmark on Report Load: To ensure the slicer defaults to the current month range when the report is loaded, you can use the bookmark created in the previous step.
Go to the "View" tab and open the "Selection" pane.
Select the slicer visual.
In the "Bookmarks" pane, right-click the bookmark you created and select "Update".
Proud to be a Super User! |
|