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
I have a facts table with forecast data and dates (as it's forecast, the dates may go into the future). I then join these dates to a date dimension table so that I can add a date range slicer in.
Is it possible to have the date range slicer to only have date ranges for this year and 1 year from the past. So for example I'm posting this on the 11th of July 2024. The date range slicer range should only be selectable from the 1st of Jan 2023 to 31st of December 2024.
Solved! Go to Solution.
@Mike282 , For this create one filtered date table
FilteredDateTable =
VAR CurrentYear = YEAR(TODAY())
VAR PreviousYear = CurrentYear - 1
RETURN
FILTER(
'DateDimension',
'DateDimension'[Date] >= DATE(PreviousYear, 1, 1) &&
'DateDimension'[Date] <= DATE(CurrentYear, 12, 31)
)
Ensure that the relationships between the new FilteredDateTable and your facts table are correctly set up.
Replace the original date dimension table with the FilteredDateTable in your visuals.
Proud to be a Super User! |
|
Thank you! Why didn't I think of just creating a date dimension table through DAX doh! Thanks for the help!!
Without knowing how your visuals are set up in your report page, this reply is only specific to your date slicer.
Yes, you can have the date range slicer to only have date ranges for this year and 1 year in the past. The simpliest way is to just apply a filter on the slicer visual
Without filter
With filter
My issue with this is that the available options for filtering relative dates here is pretty limited. Notice how selecting "is in the last 1 years" set the date range to exactly one year ago rather than include the full calendar year?
If you want to include the full calendar year, you could create a new calc column that determine if the date is within the current + last calendar year and include that as a filter for your slicer visual.
IsCurrLastYr =
VAR _today = TODAY()
VAR _cy = YEAR(_today)
VAR _ydate = YEAR(GLOBAL_DATE_DIMENSION[DATE])
RETURN IF(_ydate >= _cy - 1 && _ydate <= _cy, 1, 0)
@Mike282 , For this create one filtered date table
FilteredDateTable =
VAR CurrentYear = YEAR(TODAY())
VAR PreviousYear = CurrentYear - 1
RETURN
FILTER(
'DateDimension',
'DateDimension'[Date] >= DATE(PreviousYear, 1, 1) &&
'DateDimension'[Date] <= DATE(CurrentYear, 12, 31)
)
Ensure that the relationships between the new FilteredDateTable and your facts table are correctly set up.
Replace the original date dimension table with the FilteredDateTable in your visuals.
Proud to be a Super User! |
|
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
Check out the November 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 59 | |
| 46 | |
| 42 | |
| 23 | |
| 17 |
| User | Count |
|---|---|
| 190 | |
| 122 | |
| 96 | |
| 66 | |
| 47 |