Forum Discussion
Most efficient way to create reference tables from original table
- 4 years ago
Hi Anonymous
That's why I asked you to share sample data...Your previous sample is incomplete.
Try this:
Last Booking Date = MAXX ( FILTER ( ALL ( table ), [Parent Cust ID] = SELECTEDVALUE ( table[Parent Cust ID] ) ), [Booking Date] )Best Regards,
Community Support Team _Janey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Nope, this doesn't work, soz. It just returns the most recent Cust Last Booking Date from the entire table, and duplicates it down the column. 😞
I need the most recent Cust Last Booking Date for rows where the Parent Cust ID is the same, as per my example.
Sorry, I'm not sure how else to explain it. Perhaps this extended example helps?
| Cust ID | Cust Last Booking Date | Parent Cust ID | Parent Last Booking Date |
| 1234 | 01/12/20 | 9999 | 15/03/21 |
| 4567 | 15/03/21 | 9999 | 15/03/21 |
| 9876 | 05/09/21 | 4789 | 05/09/21 |
| 5679 | 01/10/19 | 4789 | 05/09/21 |
| 2345 | 06/07/21 | 1111 | 06/07/21 |
| 4613 | 05/09/20 | 1111 | 06/07/21 |
I'm aiming to achieve the blue column data.
Hi Anonymous
That's why I asked you to share sample data...Your previous sample is incomplete.
Try this:
Last Booking Date =
MAXX (
FILTER (
ALL ( table ),
[Parent Cust ID] = SELECTEDVALUE ( table[Parent Cust ID] )
),
[Booking Date]
)
Best Regards,
Community Support Team _Janey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.