Forum Discussion
How to remove future dates from calendar slider
Hi!
Please help in removing future dates from calendar slider, but the same are not available on my calendar table
Have you tried it after declaring your calender table as date table?
https://docs.microsoft.com/en-us/power-bi/transform-model/desktop-date-tables
9 Replies
- amitchandak
Super User
Parvez933 , In place Max Last refresh date take today() in calendar function
calendar(Min(Table[Last refresh Date]), today())
- Parvez933
Helper I
Hi amitchandak,
Tried by editing the max(last refresh) to today(). but still the future dates are available
- amitchandak
Super User
Parvez933 , what is the date used in the slicer? Or from which table you used years and month
- Samarth_18
Community Champion
Hi Parvez933 ,
Create a measure like below and use it as filter on slicer:-
_filter = IF(MAX(calender[Date])<=TODAY(),1,0)Output:-
Thanks,
Samarth
- Parvez933
Helper I
- Samarth_18
Community Champion
Have you tried it after declaring your calender table as date table?
https://docs.microsoft.com/en-us/power-bi/transform-model/desktop-date-tables
- amransFrequent Visitor
I have implemented the same using custom columns in calendar/date table. You cannot get your required behaviour if you are using default Date Hierarchy. You need to create different columns like I have shown below. Snapshot is showing how you can implement condition in filter pane to get desired result.
Custom columns created in calendar/date table
Current Date = TODAY()Year = DateTable[Dates].[Year]Month = DateTable[Dates].[Month]Quarter = DateTable[Dates].[Quarter]IsNotFuture = IF(DateTable[Dates]<=DateTable[Current Date],1,0)