Forum Discussion
jak8282
3 years agoHelper III
Get value against max date
Hi,
I have a table like follows
| Date | Name | Outcome |
| 21/09/2022 | bob | fail |
| 23/09/2022 | bob | pass |
| 24/09/2022 | bob | fail |
| 21/09/2022 | jenny | pass |
I want to have a table which return the latest outcome
| Name | Outcome |
| bob | Fail |
| jenny | pass |
Hi jak8282
Please try this measure:Latest Outcome =VAR LatestDate = CALCULATE(MAX('Table'[Date]),ALLEXCEPT('Table', 'Table'[Name]))RETURNCALCULATE(VALUES('Table'[Outcome]),'Table'[Date] = LatestDate,'Table'[Name] = SELECTEDVALUE('Table'[Name]))If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
1 Reply
- Ritaf1983Super User
Hi jak8282
Please try this measure:Latest Outcome =VAR LatestDate = CALCULATE(MAX('Table'[Date]),ALLEXCEPT('Table', 'Table'[Name]))RETURNCALCULATE(VALUES('Table'[Outcome]),'Table'[Date] = LatestDate,'Table'[Name] = SELECTEDVALUE('Table'[Name]))If this post helps, then please consider Accept it as the solution to help the other members find it more quickly