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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

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
Most Valuable Professional
Most Valuable Professional

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
Most Valuable Professional
Most Valuable Professional

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
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

July Power BI Update Carousel

Power BI Monthly Update - July 2026

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

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors