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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Matt_HD
Frequent Visitor

Summarize a table Group by one column filtering another column a status and another by the max value

Hi

 

I have a table as follows

 

Ident  Review Status          Date

123     Complete                01/12/2019

123     Complete                28/02/2020

123     Scheduled               08/02/2020

111     Complete                15/04/2020

134     Scheduled               30/04/2020 

 

 

I'd like to create a new table with only the latest complete reviews per Ident im assuming i need a combination of summarize, Group and filter but cant get it right. Can anyone help?

 

 

5 REPLIES 5
Matt_HD
Frequent Visitor

Hi

 

just to advise none of these solutions worked 

 

my resolution was to bring in the same table again with some filters on the query to give me a redacted data set, I then created a helper column and could create the new table I needed with this.

Not particularly elegant but got the job done for now.

jstorm
Resolver III
Resolver III

Use the LASTDATE() function in a CALCULATE measure. 

 

Ex.

CALCULATE(

    SUM( 'Table'[Values] ),
    LASTDATE( 'Table'[Date] )
)

 

This should only return the only latest value for each row in your matrix or table visual.

I’m not sure that’s what I’m looking for, I need a table really with distinct ident and date of latest completed

Hi @Matt_HD ,

 

Try this code for a new table:

 

T =
ADDCOLUMNS(SUMMARIZE('Table'; 'Table'[Ident]; "Date"; MAX('Table'[Date])); "Review Status"; CALCULATE(DISTINCT('Table'[Review Status]); FILTER('Table'; 'Table'[Ident] = EARLIER('Table'[Ident]) && [Date] = EARLIER([Date]))))
 
Ricardo


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!



Try this:

 

SUMMARIZE(
    'Table',
    [Ident],

    "Date", IF(
        'Table'[ReviewStatus] = "Completed",
        MAX( 'Table'[Date] )
    )
)

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Top Solution Authors