Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

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