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

Get Fabric certified for FREE! Don't miss your chance! Learn more

Reply
prasadhebbar315
Advocate I
Advocate I

Show last updated category for each ID

Hello,

 

I have 3 columns (ID, Status and Last_Updated_Date). ID can repeat and the status can change from Low->Moderate->High->Critical. I would like to capture Max_Date for each ID based on max(Last_Updated_Date) and Latest_Status is Status from max(Last_Updated_Date). Here is an example from excel file. Can someone help achive this in PBI please?

 

IDStatusLast_Updated_DateMax_DateLatest_Status
100High2/14/20232/14/2023High
100High2/13/20232/14/2023High
100Low2/12/20232/14/2023High
200Critical2/12/20232/12/2023Critical
300Moderate2/13/20232/13/2023Moderate
300Low2/12/20232/13/2023Moderate

 

2 ACCEPTED SOLUTIONS
Ahmedx
Super User
Super User

Max_Date = 
CALCULATE (
    MAX ( 'Table'[Last_Updated_Date] ),
    ALLEXCEPT ( 'Table', 'Table'[ID] )
)
-----
Latest_Status = 
CALCULATE (
    MAX ( [Status] ),
    ALL ( 'Table' ),
    'Table'[ID] = EARLIER ( 'Table'[ID] )
        && 'Table'[Last_Updated_Date] = 'Table'[Max_Date]
)

https://dropmefiles.com/RrfxE

View solution in original post

miTutorials
Super User
Super User

4 REPLIES 4
miTutorials
Super User
Super User

I have explained in this tutorial please do check this out.

 

Get another column value based on the Max Date or Max Value in PowerBI 

Thanks @miTutorials 

Ahmedx
Super User
Super User

Max_Date = 
CALCULATE (
    MAX ( 'Table'[Last_Updated_Date] ),
    ALLEXCEPT ( 'Table', 'Table'[ID] )
)
-----
Latest_Status = 
CALCULATE (
    MAX ( [Status] ),
    ALL ( 'Table' ),
    'Table'[ID] = EARLIER ( 'Table'[ID] )
        && 'Table'[Last_Updated_Date] = 'Table'[Max_Date]
)

https://dropmefiles.com/RrfxE

@Ahmedx Fantastic. Your solution works 🙂

 

Helpful resources

Announcements
Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

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

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.