Apply this as a visual-level filter on your date slicer.
Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi,
Could you help me with the scenario below?
I want to dynamically show the 2 differnt date slicers based on slicer value slection.
In slicer, I should have 2 values, one is MTD, second one is custom.
If user select MTD option in the slicer, it should return the date range slicer and it should enable the dates range from 1st of current month to till current date( For history and future dates, it should not allow user to select)
If user select custom in the slicer, it should display date range slicer without any restrictions(like should allow all history and future dates as well).
Can any one share the sample pbxi file?
Thanks,
Sri
Solved! Go to Solution.
Hi Ugendar,
Thanks for your solution. it working as expected.
Hi @Koritala ,
Could you please let us know whether your issue has been resolved or if you are still encountering any difficulties? Your feedback is important to the community and may assist others with similar concerns.
Thank You.
Hi, issue not resolved. Based on selection, date slicers are not showing
Hi @Koritala ,
Thank you for your time. Since Power BI doesn’t offer conditional slicer visibility directly, I used bookmarks and the Selection pane to toggle between two slicers.
Here’s what I did.
1.Created a helper table with MTD and Custom values and used it as a slicer.
2. Slicer_Date_MTD- Set advanced filtering to show dates from the start of this month to today.
3. Slicer_Date_Custom- left unfiltered for the full date range.
4. Set up bookmarks
5. Added two buttons MTD View and Custom View linked to each bookmark, so users can switch modes easily.
FYI:
This method uses only built in Power BI features and keeps the interface simple. I’ve attached a sample PBIX file for you to review let me know if you want any changes.
Regards,
Yugandhar.
Hi Ugendar,
Thanks for your solution. it working as expected.
Thank you for your response, @Koritala . If possible, please mark the helpful response as the solution so it can benefit other community users more easily.
I'm glad you found a solution! We're here in the community to support each other.
Hi @Koritala ,
Apologies for the delayed response.
As of now, Power BI doesn’t natively support this requirement. However @Ilgar_Zarbali suggested workaround, I’ve implemented a solution using two slicers combined with bookmarks, and tested it with sample data.
FYI:
For your reference, I’ve attached a PBIX file please feel free to explore the logic and setup.
Thanks again, @Ilgar_Zarbali , for your valuable input.
Hope this helps.
Best regards,
Yugandhar.
Hi @Koritala ,
If you've had a chance to review @Kedar_Pande response? please let us know if you need any additional information or clarification. We're happy to assist further if needed.
Thank You.
Create a disconnected table with values MTD and Custom.
Use a measure to set min/max dates based on the selected value, e.g.:
DateFilter =
IF(SELECTEDVALUE(Slicer[Type]) = "MTD",
Dates[Date] >= STARTOFMONTH(TODAY()) && Dates[Date] <= TODAY(),
TRUE()
)
Apply this as a visual-level filter on your date slicer.
Hi Kedhar,
can you please share the pbxi file. I couldn't get the result.
Thanks,
Sri
Hi Kedhar,
Can you share the pbxi file for your solution.
Thanks,
Sri
Hi Kedar,
Can you share the pbxi if have for the same?
Thanks,
Sri
Short version: you can’t “re-program” a single Date slicer so that its selectable range changes based on another slicer. Slicers only accept column filters, not measure logic, so they can’t react that way.
You have two practical patterns:
A) Best UX (two slicers + bookmarks)
1. Create a disconnected selector:
Mode =
DATATABLE ( "Mode", STRING, { { "MTD" }, { "Custom" } } )
2. Put two Date slicers on the page:
3. Use Selection pane + Bookmarks:
This gives exactly the behavior you want: user picks MTD → the “This Month” slicer is shown; user picks Custom → a free date-range slicer is shown.
B) Single slicer (limit the effect with a measure)
If you prefer one visible slicer, you can’t restrict its UI, but you can restrict how dates affect visuals when MTD is chosen.
1. Same disconnected Mode table as above.
2. Create a filter measure:
Date Filter :=
VAR ModeSel = SELECTEDVALUE ( Mode[Mode], "Custom" )
VAR D = MAX ( 'Date'[Date] )
VAR StartM = DATE ( YEAR ( TODAY() ), MONTH ( TODAY() ), 1 )
RETURN
IF (
ModeSel = "MTD",
IF ( D >= StartM && D <= TODAY(), 1, 0 ),
1
)
3. Put your normal Between Date slicer on Date[Date].
4. Add Date Filter to the Visual-level filters for all visuals that should respect the rule and set it to is 1.
I hope it helps.
Hi Ilgar,
Thanks for your email.
Could you please share pbxi file if you already worked on this?
Thanks,
Sri.
Hey @Koritala ,
This is not possible.
Regards,
Tom
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.