Forum Discussion
maurcoll
1 year agoHelper IV
First/earliest Date
Hi i am trying to work out which is the earliest/First order date per customer as per the below. I have been trying to use the earlier function where the customer number = earlier customer number a...
- 1 year ago
Hello maurcoll
Us this DAX to create calculated column
Ordered =
VAR EarliestDate =
CALCULATE(
MIN('customer'[Order Date]),
ALLEXCEPT('customer', 'customer'[Customer Number])
)
RETURN
IF('customer'[Order Date] = EarliestDate, "First", BLANK())
Thanks,
Pankaj Namekar | LinkedInIf this solution helps, please accept it and give a kudos (Like), it would be greatly appreciated.
Sasidhar1
1 year agoRegular Visitor
Hi maurcoll ,
Hope you are doing well.
I can see there is no issue with the dax what you have written and the output is also expected as we are having different dates for a customer number that was mapped to blank and for customer for min order date is mapped to First.
Let us know what is the output you are expecting.
Thanks