Forum Discussion

schoden's avatar
schoden
Post Partisan
5 years ago
Solved

FIRSTDATE and LASTDATE Functions

Hi Community,    I am trying to get only the  FIRST order of a customer. A customer can have many orders.    The measure created is :  CALCULATE(MIN('Date'[DateOrdered]),ALL(Date'[Date]))   N...
  • schoden's avatar
    schoden
    5 years ago

    Thank you community , I searched past post and came across post that helped me solve it.

     

    I wrote another measure as a 

     

     Check =
    var datecheck= MIN('Date'[Date])
    Return
    IF( [FirstOrder]= datecheck, 1, 0)  
     
    With this check set as 1, It returns all FIRST DATE of a customer that is same to the slicer Selection date.
     
    Cheers.