Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
CJ_96601
Helper V
Helper 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 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 2
Greg_Deckler
Community Champion
Community Champion

@CJ_96601 Try:

Measure = 
  VAR __Date = MAX('Table'[Date])
  VAR __Result = MAXX(FILTER('Table',[Date] = __Date),[Score])
RETURN
  __Result


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Thanks..but it is not working.

 

 it wasn't giving the latest score

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.