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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
bastik
Frequent Visitor

Latest date and Condition/filter

Hi, 

I have the following data set and I would like to get the most recent items with a specific status (e.g Code review)

Ticket IDStatusLast Updated
Key-1To Do1/1/2022 11:32:12
Key-1In Progress1/1/2022 12:32:12
Key-1To Do1/2/2022 11:32:12
Key-1In Progress1/2/2022 14:32:12
Key-1Code Review1/2/2022 15:32:12
Key-1Closed1/2/2022 16:32:12
Key-2To Do1/1/2022 11:32:12
Key-2In Progress1/1/2022 12:32:12
Key-2To Do1/2/2022 11:32:12
Key-2In Progress1/2/2022 14:32:12
Key-2Code Review1/2/2022 15:32:12

 

I've tried =CALCULATE (MAX([Last Updated]), FILTER(Table,Table[Status] = 'Code Review') but that brings incorrect data for what I want, as it also retrieves items that have had that status in the past. For example: if KEY-1 was in Code Review twice, the formula above will bring the MAX date of the two, and include KEY-1 in the measure

I only want the items that are now/or most recent in Code Review

I'm not sure if MAX or LASTDATE can solve this.

Any ideas? Any help would be kindly appreciated. 

2 REPLIES 2
AlexanderPrime
Solution Supplier
Solution Supplier

Are you looking to get this as a measure to go on the table provided in your original post? Or are you just after another table list that shows the latest date for a code review on each ticket ID?

 

If it's the latter, no DAX would be needed, you could just make a new table with these 3 columns. Change the "Last Updated" Values on the visual to show "Latest" by clicking on the dropdown arrow for it,. Then filtering the visual to show only Code Review. 

(Made a slight change on your provided data to show Key-2's Code Review a minute later than Key-1's to show it is picking up a different one).

 

AlexanderPrime_0-1660816120849.png

 


Please note - I am not affiliated with Microsoft, I'm just an end user like yourself.
Just a regular guy doin' Data Science.

If my post has helped you, please don't forget to thumbs up or click "Accept as solution" if it solved your problem!

I'm looking to display this as a single card and distributed in time. 

The above wouldn't work as Key-1's latest status is not Code Review but Closed. So from my table, I would need to bring back only Key-2 since it's latest status is 'Code review'. 

I don't need the latest date of 'Code Review', I need the items that have their last status 'Code Review'.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Kudoed Authors