Forum Discussion

Dk_bbr's avatar
Dk_bbr
Regular Visitor
2 years ago
Solved

how to find interval between dates

My english too bad for this hope you can understand. I have problem like some guide comes 10 time in year to my store and i need to find how much days to take between that 10 comes?
  • ryan_mayu's avatar
    ryan_mayu
    2 years ago

    not sure if this is what you want

     

    Column =
    VAR _last=maxx(FILTER('Table','Table'[GuideID]=EARLIER('Table'[GuideID])&&'Table'[Date]<EARLIER('Table'[Date])),'Table'[Date])
    return if(ISBLANK(_last),blank(),DATEDIFF(_last,'Table'[Date],DAY))
     
     
    then create a measure
    measure = AVERAGE('Table'[Column])
     
    pls see the attachment below