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

Join the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now

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
April Power BI Update Carousel

Power BI Monthly Update - April 2026

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

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

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.

FabCon and SQLCon Highlights Carousel

FabCon &SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.