Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
8 years ago
Solved

Reference Sliced date in expression

I need to create a measure that, as part of its calculation, knows what the date range from the date range slicer is?   Each row of data is date and time stamped so I can reeference that, but bette...
  • v-huizhn-msft's avatar
    8 years ago

    Hi Anonymous,

    If you add Table[Date] in slicer, and you select a date range in slicer, you can create a measure using formula below to get the latest date of the range in slicer.

    Latest Date in slicer =
    CALCULATE ( LASTDATE ( Table[Date] ), ALLSELECTED ( Table ) )
    


    Then you can use the meausre [Latest Date in slicer] in another DAX expression.

    Best Regards,
    Angelia