Forum Discussion
schoden
5 years agoPost Partisan
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...
- 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])ReturnIF( [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.
amitchandak
5 years agoSuper User
schoden , These two should able to give you the same
CALCULATE(MIN('Date'[DateOrdered]),ALLselected('Date'[Date]))
or
firstnonbank('Date'[DateOrdered],blank())
- schoden5 years agoPost Partisan
amitchandak yes all you mentioned it gives all first date order of a customer.
BUT now I want to filter those first date based on slicer date selected.
Slicer chosen is AUg 2020 but first date shows all record of First date for a customer from 2009 also.
- schoden5 years agoPost Partisan
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])ReturnIF( [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.