Forum Discussion

NewbieJono's avatar
NewbieJono
Icon for Post Partisan rankPost Partisan
4 years ago
Solved

Date Filter not change when new data added

Hello, Every day i add a new set of data. Some days i add the past 3 days (weekends). 

 

This data overwrites the current data.  so there is only ever the past 1-3 days of data there.

 

However when power bi refreshes, the data filter will still show a date that has been deleted.

 

e.g today showed wendesday but there was no data for wendesday, i had to select Thursday Manual.

 

How can i get the filter to just show the latest date in the drop down.

 

  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi NewbieJono ,

    Do you want to set the default selection of Date slicer with latest date? If yes, you can refer the following links to achieve it.

    latest date in the slicer

    Slicer Date column = IF ( 'date table'[Date] = MAX ( 'date table'[Date] ), "Latest Date", 'date table'[Date] & "" )

    Select latest date in Slicer

    Default Slicer Value = 
    
    VAR MaxDate = 
    CALCULATE(
        MAX( Dates[Date] ),
        ALL(Dates[Date] )
    )
    
    VAR Selected =
    SELECTEDVALUE(
        Dates[Date],
        MaxDate
    )
    
    RETURN
    Selected 

    Best Regards

3 Replies