Forum Discussion
Remove dublicates, keep value based on another column
Hi,
I have a table with all operations on a production order. I could like to remove all duplicates BUT keep the latest operation.
For example: Rows marked with purple is the one I would like to save based on latest date. How do I do that? Many thanks in advance for all efforts!
| Production order no. | Operation | Date: |
| 1 | a | 2023-02-18 18:20:15 |
| 1 | b | 2023-02-20 13:15:20 |
| 1 | c | 2023-02-20 14:30:00 |
| 2 | a | 2023-02-17 13:15:20 |
| 2 | b | 2023-02-20 15:30:00 |
| 3 | c | 2023-01-30 16:23:30 |
| 3 | d | 2023-02-05 07:12:59 |
Hi
You can create a measure that filters the data depending on the operation no. and then checks if the selected date is the latest. I've done it like this:You can then add this measure to your table or just use it as a filter. This will only keep the latest dates for each production order no.:
Hope this helps.
Best regards.
3 Replies
- sebastiandyrbyResolver I
Hi
You can create a measure that filters the data depending on the operation no. and then checks if the selected date is the latest. I've done it like this:You can then add this measure to your table or just use it as a filter. This will only keep the latest dates for each production order no.:
Hope this helps.
Best regards.