Forum Discussion

CJ_96601's avatar
CJ_96601
Helper V
3 years ago

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 NumberDateScore
11/1/2019E
11/1/2020B
11/1/2021B
11/1/2022E
21/1/2019E
21/1/2020 
21/1/2021B
21/1/2022E
21/2/2023B
31/1/2019E
31/1/2020E
31/1/2021 
31/1/2022E
31/2/2023B
41/1/2022E
41/2/2023B

 

Thanks ... 

 

2 Replies

  • Greg_Deckler's avatar
    Greg_Deckler
    Community Champion

    CJ_96601 Try:

    Measure = 
      VAR __Date = MAX('Table'[Date])
      VAR __Result = MAXX(FILTER('Table',[Date] = __Date),[Score])
    RETURN
      __Result
    • CJ_96601's avatar
      CJ_96601
      Helper V

      Thanks..but it is not working.

       

       it wasn't giving the latest score