Forum Discussion
CJ_96601
3 years agoHelper V
Latest value
I need to get the latest value based on a given data when record is selected.
If i select record # 1 = the result will be "E", but if the date filter is set to year 2021, the result will be "B"
If i select record # 2, even if i select year 2020, the result will be"E", if ther is no year selected, the result will be "E" as it will ignore blank
| Record Number | Date | Score |
| 1 | 1/1/2019 | E |
| 1 | 1/1/2020 | B |
| 1 | 1/1/2021 | B |
| 1 | 1/1/2022 | E |
| 2 | 1/1/2019 | E |
| 2 | 1/1/2020 | |
| 2 | 1/1/2021 | B |
| 2 | 1/1/2022 | E |
| 2 | 1/2/2023 | B |
| 3 | 1/1/2019 | E |
| 3 | 1/1/2020 | E |
| 3 | 1/1/2021 | |
| 3 | 1/1/2022 | E |
| 3 | 1/2/2023 | B |
| 4 | 1/1/2022 | E |
| 4 | 1/2/2023 | B |
Thanks ...
2 Replies
- Greg_DecklerCommunity Champion
CJ_96601 Try:
Measure = VAR __Date = MAX('Table'[Date]) VAR __Result = MAXX(FILTER('Table',[Date] = __Date),[Score]) RETURN __Result- CJ_96601Helper V
Thanks..but it is not working.
it wasn't giving the latest score