Forum Discussion

JorgeMolano's avatar
JorgeMolano
Frequent Visitor
4 years ago
Solved

Date Diff using date Filter

Hi community,  I want to create a measure that calculate the days between the oldest date of my table and a day selection based on date filter. For insance, using the table below, the oldest date...
  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi JorgeMolano 

     

    What if no selection in the slicer? What do you want to display, the blank? Modify the table and column name accordingly

    test = 
    VAR CurDate=SELECTEDVALUE(DateTable[Dates])
    VAR MinDate = MINX(ALL(DateTable[Dates]),DateTable[Dates])
    RETURN
    DATEDIFF(MinDate,CurDate,DAY)