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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

March2025 Carousel

Fabric Community Update - March 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors