Forum Discussion
EugenioProlog
1 year agoHelper III
Dynamic Data Slicer filtering date column
Hello! I have a simple data slicer filtering a date column. Is there a way to make my Max limit date to be The last day of the NEXT month? (it has to change dynamically every month)
- 1 year ago
You can either filter the date table in the query editor to load dates up to the last day of the next month assuming you won't have a need for them or create a column that checks whether a date is <=last date of the next month and use that as a filter. Here's a sample DAX calc column
Check = VAR _timezone = 8 -- Define the user's timezone offset (e.g., UTC+8) VAR _today = INT ( UTCNOW () + DIVIDE ( _timezone, 24 ) ) RETURN CalendarTable[Date] <= EOMONTH ( _today, 1 )
danextian
1 year agoSuper User
You can either filter the date table in the query editor to load dates up to the last day of the next month assuming you won't have a need for them or create a column that checks whether a date is <=last date of the next month and use that as a filter. Here's a sample DAX calc column
Check =
VAR _timezone = 8 -- Define the user's timezone offset (e.g., UTC+8)
VAR _today =
INT ( UTCNOW () + DIVIDE ( _timezone, 24 ) )
RETURN
CalendarTable[Date] <= EOMONTH ( _today, 1 )