Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
111 | |
100 | |
80 | |
64 | |
58 |
User | Count |
---|---|
146 | |
110 | |
93 | |
84 | |
67 |