Forum Discussion
Seanan
Solution Supplier
3 years agoDynamic date range
Hi guys,
I have a bit of an issue here which I've been struggling with.
I have a slicer in my report that currently has a date range that is 01/08/2022-Today() based on dates from a date ...
- 3 years ago
Could you add a column to your Dates table like this?
Current Range = VAR _Today = TODAY() VAR _Year = IF ( MONTH ( _Today ) < 8, YEAR ( _Today ) - 1, YEAR ( _Today ) ) VAR _Start = DATE ( _Year, 8, 1 ) VAR _End = EOMONTH ( _Start, 11 ) RETURN [Date] >= _Start && [Date] <= _TodayThen you set a filter on 'Dates'[Current Range] = True on either the slicer or the page.
jdbuchanan71
Super User
3 years agoCould you add a column to your Dates table like this?
Current Range =
VAR _Today = TODAY()
VAR _Year = IF ( MONTH ( _Today ) < 8, YEAR ( _Today ) - 1, YEAR ( _Today ) )
VAR _Start = DATE ( _Year, 8, 1 )
VAR _End = EOMONTH ( _Start, 11 )
RETURN [Date] >= _Start && [Date] <= _Today
Then you set a filter on 'Dates'[Current Range] = True on either the slicer or the page.
Seanan
Solution Supplier
3 years ago