Forum Discussion
Extract Table from another Table based on a date criteria
Hey Gurus,
I have the following table and I would like to extract Distinct Names and the oldest date coreesponding to this date:
| Name | Date |
| Adam | 1/1/2002 |
| Adam | 14/5/2006 |
| Adam | 12/12/2022 |
| John | 1/7/1900 |
| John | 1/1/2025 |
Result should be:
Adam 1/1/2002
John 1/7/1900
Any ideas?
- Anonymous3 years ago
Hi Anonymous,
I'd like to suggest you use the name field as category to create a table visual, then you can write a measure formula to find out the first date based on current name group:
formula = CALCULATE ( Min( Table[Date] ), ALLSELECTED ( Table ), VALUES ( Table[Name] ) )If you mean to create a new table with correspond results, you can ty use the following formula if it helps:
NewTable = SUMMARIZE ( Table, Table[Name], "Oldest Date", MIN ( Table[Date] ) )Regards,
Xiaoxin Sheng
1 Reply
- AnonymousNot applicable
Hi Anonymous,
I'd like to suggest you use the name field as category to create a table visual, then you can write a measure formula to find out the first date based on current name group:
formula = CALCULATE ( Min( Table[Date] ), ALLSELECTED ( Table ), VALUES ( Table[Name] ) )If you mean to create a new table with correspond results, you can ty use the following formula if it helps:
NewTable = SUMMARIZE ( Table, Table[Name], "Oldest Date", MIN ( Table[Date] ) )Regards,
Xiaoxin Sheng