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 need the urgent help in custom date slicer.
User want to have a radio button slicer it should have MTD and Custom values.
when user selected the MTD option, the calendar date picker should allow user to select from the 1st of the current month to till today's date( all future dates in the current month calendar picker should be greyed out).
when user select Custom option from the radio button slicer, it should show normal date range slicer to select history and future dates.
Can anyone help in this and share the sample pbxi file to understand the logic.
Thanks,
Sri
Solved! Go to Solution.
As mentioned in my last response, you can achieve it using bookmarks.
In the PBIX which I shared, boomarks are created and you can refer it
Connect on LinkedIn
|
Hi @Koritala , Thank you for reaching out to the Microsoft Community Forum.
I reproduced the scenario on my end using a short sample data based on @tharunkumarRTK 's pbix and it worked successfully. To help you better understand the implementation, I’ve attached the .pbix file for your reference. Please take a look at it and let me know your observations.
Thank you @tharunkumarRTK for your valuable response.
Hi hashadapu,
date logic working as expected. But one morething is that at a time I should show one date slicer only based on selection of the tabs. How can we achive that? can you share updated pbxi plz?
Thanks,
Sri
As mentioned in my last response, you can achieve it using bookmarks.
In the PBIX which I shared, boomarks are created and you can refer it
Connect on LinkedIn
|
Thanks Tharun and it is working as expected.
Hi @Koritala , Hope you're doing okay! May we know if it worked for you, or are you still experiencing difficulties? Let us know — your feedback can really help others in the same situation.
Hi @Koritala , hope you are doing great. May we know if your issue is solved or if you are still experiencing difficulties. Please share the details as it will help the community, especially others with similar issues.
1. Create an MTD flag column in your date table using M language or DAX
2. Create two bookmarks
MTD: with a drop down slicer and a visual level MTD flag = TRUE filter
Custom bookmark with a Between type date slicer
As far as I know with native power bi slicers its not possible to change the type of a slicer from Between to dropdown or vice versa based on the selection of a value in another slicer. With bookmarks you can achieve it
Connect on LinkedIn
|
Hi Tharun,
In your pbxi file, when MTD selected, it is showing all the dates for the current month instead of showing first date to today's date. can you plz review once and let me know?
Regards,
Sri
Just update the MTD flag logic
Table.AddColumn(
#"Changed Type",
"MTD Flag",
each [Date] >= Date.StartOfMonth(Date.From(DateTime.LocalNow()))
and [Date] <= Date.From(DateTime.LocalNow()),
type logical
)
Connect on LinkedIn
|
Hi Tharun,
can you plz share pbxi file which you have created?
Thanks,
Sri
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 41 | |
| 38 | |
| 36 | |
| 30 | |
| 28 |
| User | Count |
|---|---|
| 128 | |
| 88 | |
| 79 | |
| 67 | |
| 62 |