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

Data Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more

Reply
Mediviz
Frequent Visitor

select the last value saved by item

Hi everyone

Below I have a table with dates and scores by name.

 

NomDateScore
AAA01.01.2021  1540
AAA02.01.2021   1640
AAA03.01.2021   1753
AAA04.01.2021        1840
AAA05.01.2021    1940
AAA06.01.2021   2040
AAA07.01.2021870
BBB01.01.2021875
BBB02.01.2021698
BBB03.01.2021566
BBB04.01.2021641
BBB05.01.2021255
CCC01.01.2021120
CCC02.01.2021218
CCC03.01.202155

 

I need to display only the last score recorded by name.

 

NomDateScore
AAA07.01.2021    870
BBB05.01.2021    255
CCC03.01.2021   55


Thanks for your help

2 ACCEPTED SOLUTIONS
ERD
Community Champion
Community Champion

Hi @Mediviz ,

You can try this measure:

 

MaxValuePerNom = 
VAR currNom = SELECTEDVALUE ( T[Nom] )
VAR maxDate = MAXX ( FILTER ( ALL ( T ), T[Nom] = currNom ), T[Date] )
RETURN
    IF (
        SELECTEDVALUE ( T[Date] ) = maxDate,
        CALCULATE ( MAX ( T[Score] ), T[Nom] = currNom, Table15[Date] = maxDate )
    )

ERD_0-1624947316305.png

 

 

If this post helps, then please consider Accept it as the solution ✔️to help the other members find it more quickly.



If this post helps, then please considerAccept it as the solution to help the other members find it more quickly.
Appreciate your Kudos
Stand with Ukraine! 

View solution in original post

Icey
Community Support
Community Support

Hi @Mediviz ,

 

Try this:

Measure filter =
VAR LastDate_ =
    CALCULATE ( MAX ( 'Table'[Date] ), ALLEXCEPT ( 'Table', 'Table'[Nom] ) )
RETURN
    IF ( MAX ( 'Table'[Date] ) = LastDate_, 1 )

measure filter.PNG

 

 

Best Regards,

Icey

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
Icey
Community Support
Community Support

Hi @Mediviz ,

 

Try this:

Measure filter =
VAR LastDate_ =
    CALCULATE ( MAX ( 'Table'[Date] ), ALLEXCEPT ( 'Table', 'Table'[Nom] ) )
RETURN
    IF ( MAX ( 'Table'[Date] ) = LastDate_, 1 )

measure filter.PNG

 

 

Best Regards,

Icey

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

ERD
Community Champion
Community Champion

Hi @Mediviz ,

You can try this measure:

 

MaxValuePerNom = 
VAR currNom = SELECTEDVALUE ( T[Nom] )
VAR maxDate = MAXX ( FILTER ( ALL ( T ), T[Nom] = currNom ), T[Date] )
RETURN
    IF (
        SELECTEDVALUE ( T[Date] ) = maxDate,
        CALCULATE ( MAX ( T[Score] ), T[Nom] = currNom, Table15[Date] = maxDate )
    )

ERD_0-1624947316305.png

 

 

If this post helps, then please consider Accept it as the solution ✔️to help the other members find it more quickly.



If this post helps, then please considerAccept it as the solution to help the other members find it more quickly.
Appreciate your Kudos
Stand with Ukraine! 

amitchandak
Super User
Super User

@Mediviz , Try a measure like


Measure =
VAR __id = MAX ('Table'[Nom] )
VAR __date = CALCULATE ( max('Table'[Date] ), ALLSELECTED ('Table' ), 'Table'[Nom] = __id )
CALCULATE ( Sum ('Table'[Score] ), VALUES ('Table'[Nom] ),'Table'[Nom] = __id,'Table'[Date] = __date )

 

if need take amx for dat

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.