Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
1 year ago
Solved

undefined

I have a date column, in which new values get added frequently not daily. Example values given below 2025-04-07, 2025-04-05, 2025-04-02. I want to create a slicer where by default select late...
  • pankajnamekar25's avatar
    1 year ago

    Hello Anonymous 

     

    You can use the dax for calculated column

     

    LastDateLabel =
    VAR LatestDate = CALCULATE(MAX('YourTable'[Date]), ALL('YourTable'))
    RETURN
    IF(
    'YourTable'[Date] = LatestDate,
    "Last Date",
    RELATED('d_Calendario'[Date]) -- or FORMAT(RELATED(...), "yyyy-mm-dd") if you want a formatted text
    )

     

    use this column to slicer keep last date selected in slicer

     

    Thanks,
     Pankaj Namekar | LinkedIn

    If this solution helps, please accept it and give a kudos (Like), it would be greatly appreciated.