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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

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
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors