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

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live 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
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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! It's time to submit your entry.

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 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.