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 Team,
we have requirement where we need to show date slicer which will have dates starting from 01-January of current year till today. So as of now, it should show only dates from 01-Jan-2019 to 15-Nov-2019. For this, we have created Calender table in Power BI that has below formula in Power Query to select range from current year till today.
= {Number.From(#date(Date.Year(DateTime.LocalNow()), 1, 1))..Number.From(#date(Date.Year(DateTime.LocalNow()), Date.Month(DateTime.LocalNow()), Date.Day(DateTime.LocalNow())))}
= Table.FromList(Source, Splitter.SplitByNothing(), null, null, ExtraValues.Error)
= Table.TransformColumnTypes(#"Converted to Table",{{"Column1", type date}})
However, when we bind it to date slicer, user can still select dates beyond the given range. I.e User can select dates prior to 2019 as well as dates beyond today. Please see below screenshot.
We need to restrict user dynamicaly as per current year. So if when we enter Year 2020, user shouldn't be able to select any date range prior to 01-Jan-2020.
Please suggest how can we restrict user not to select dates beyond given ranges.
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 20 | |
| 11 | |
| 9 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 31 | |
| 29 | |
| 21 | |
| 12 | |
| 12 |