Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
I am trying to create a calculated column that pulls the date of a sequential event in a series of events. The data I'm working with has account numbers, date of event, and event type. The type of events contains selections such as D1 and F1. D1 events precede all F1 events (e.g. customer starts at D1 event and ends with the corresponding F1 event).
For simplicity, this is what the table looks like:
These are the results I'm looking to get:
I'm struggling to wrap my brain around how to get to this result. I'd assume that I would have to create some sort of index based on account number and event type and then reference the next number in the index for the event to get the date. Any help would be greatly appreciated. Thank you!
Solved! Go to Solution.
@Anonymous ,
Create a calculate column using DAX below:
Date of Sequential Event = IF('Table'[Event Type] = "D1", CALCULATE(MIN('Table'[Date of Svc]), FILTER('Table', 'Table'[Acct Nbr] = EARLIER('Table'[Acct Nbr]) && 'Table'[Event Type] = "F1")), BLANK())
Community Support Team _ Jimmy Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous ,
Create a calculate column using DAX below:
Date of Sequential Event = IF('Table'[Event Type] = "D1", CALCULATE(MIN('Table'[Date of Svc]), FILTER('Table', 'Table'[Acct Nbr] = EARLIER('Table'[Acct Nbr]) && 'Table'[Event Type] = "F1")), BLANK())
Community Support Team _ Jimmy Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
User | Count |
---|---|
98 | |
90 | |
82 | |
73 | |
67 |
User | Count |
---|---|
115 | |
102 | |
98 | |
71 | |
67 |