Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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 July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
23 | |
10 | |
10 | |
9 | |
7 |