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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
Anonymous
Not applicable

Comparing data (dates) from the same table with same ID, and displaying the max date

Hi,

 

I was wondering if it's possible to compare dates within the same table with same ID, but the catch is that there is an additional column that display the status. For instance, here's a table:

 

IDStatusDate
1Running2/3/2018
1Stopped4/4/2018
2Running3/24/2018
2Stopped1/2/2018

 

----------------------------------------------------

 

The results I'm expecting to see is this:

 

IDStatusDate (highest date)
1Stopped4/4/2018
2Running3/24/2018

 

 

Is there a way I can do this? A group by with ID would work, but the status column part would not being showing. Maybe using M language or DAX or something from the GUI. Could you show me a solution? I recently started using PowerBI at work, so I still have a lot to learn.

 

Thanks

 

 

 

1 ACCEPTED SOLUTION
v-yuta-msft
Community Support
Community Support

Hi bcwan,

 

You can create a measure using DAX formula like below:

Date(highest date) = CALCULATE(MAX(Table1[Date]), ALLEXCEPT(Table1, Table1[ID]))

Capture.PNG 

 

Regards,

Jimmy Tao

View solution in original post

1 REPLY 1
v-yuta-msft
Community Support
Community Support

Hi bcwan,

 

You can create a measure using DAX formula like below:

Date(highest date) = CALCULATE(MAX(Table1[Date]), ALLEXCEPT(Table1, Table1[ID]))

Capture.PNG 

 

Regards,

Jimmy Tao

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.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

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.