Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
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! |
|