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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
cottrera
Post Prodigy
Post Prodigy

Grouping issue

Hi Community 

 

I have a table like this one below

Required ActionInput DateTest GradeOverall ActionUnit ReferenceEstate Test
NONE06/07/2023DN65335Cleaning
NONE23/06/2023UN65335Grounds Maintenance
NONE06/07/2023DN65335Grounds Maintenance
NONE01/06/2023CN65335Cleaning
NONE01/06/2023CN65335Grounds Maintenance
NONE07/07/2023CN65369Cleaning
NONE09/06/2023UN65369Cleaning
NONE30/06/2023UN65369Cleaning
NONE30/06/2023UN65369Grounds Maintenance
NONE19/06/2023UN65369Grounds Maintenance
NONE09/06/2023UN65369Grounds Maintenance
NONE07/07/2023CN65369Grounds Maintenance
NONE02/06/2023CN65369Cleaning
NONE02/06/2023CN65369Grounds Maintenance
NONE02/06/2023UN65385Cleaning
NONE09/06/2023UN65385Grounds Maintenance
NONE19/06/2023UN65385Grounds Maintenance
NONE02/06/2023UN65385Grounds Maintenance
NONE30/06/2023UN65385Cleaning
NONE09/06/2023UN65385Cleaning
NONE19/06/2023UN65385Cleaning
NONE07/07/2023CN65385Cleaning
NONE07/07/2023CN65385Grounds Maintenance
NONE30/06/2023UN65385Grounds Maintenance

 

I would like to group it in powert query so that the maximum Input date line is displayed.

The example below is how I would like to result to look like.

 

Unit ReferenceEstate TestInput DateTest GradeRequired Action
65335Cleaning06/07/2023DNONE
65335Grounds Maintenance23/06/2023UNONE
65369Cleaning07/07/2023CNONE
65369Grounds Maintenance07/07/2023CNONE
65385Cleaning07/07/2023CNONE
65385Grounds Maintenance07/07/2023CNONE

 

I have tried this method 

 

cottrera_1-1690282002533.png

 

but the results are wrong

 

Richard

 

1 ACCEPTED SOLUTION
Vijay_A_Verma
Super User
Super User

You can use this as your Group step

= Table.ExpandRecordColumn(Table.Group(#"Changed Type", {"Unit Reference", "Estate Test"}, {{"Input Date", each List.Max([Input Date])}, {"All", each Table.Max(_, {"Input Date"})[[Test Grade], [Required Action]]}}), "All", {"Test Grade", "Required Action"}, {"Test Grade", "Required Action"})

View solution in original post

2 REPLIES 2
cottrera
Post Prodigy
Post Prodigy

Works perfectly thank you😀

Vijay_A_Verma
Super User
Super User

You can use this as your Group step

= Table.ExpandRecordColumn(Table.Group(#"Changed Type", {"Unit Reference", "Estate Test"}, {{"Input Date", each List.Max([Input Date])}, {"All", each Table.Max(_, {"Input Date"})[[Test Grade], [Required Action]]}}), "All", {"Test Grade", "Required Action"}, {"Test Grade", "Required Action"})

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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