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
ctien
New Member

Advanced Power Query - Group by dataset including Start Date and End Date

HI,

 

I have below Source dataset 

 

Source data
Employee IDFunctionStart DateEnd DateDays
A001PM2024-01-012024-01-3131
A001PM2024-02-012024-02-1515
A001Consultant2024-02-162024-02-2914
A001PM2024-03-012024-03-3131
A001Consultant2024-04-012024-04-3030
    121

 

And i was hoping to produce the below summary 

 

 

Target summary
Employee IDFunctionStart DateEnd DateDays
A001PM2024-01-012024-02-1546
A001Consultant2024-02-162024-02-2914
A001PM2024-03-012024-03-3131
A001Consultant2024-04-012024-04-3030
    121

 

 

 

when using Group by function for Employee ID and Function  with min for start date and max for end date.  I got the below summary which is not correct.

 

Group by Emplee ID and Function. - Incorrect Summary
Employee IDFunctionStart DateEnd DateDays
A001PM2024-01-012024-03-3191
A001Consultant2024-02-162024-04-3075
   Incorrect

166

 

Does any expert have any good solution?   Many thanks in advance.

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Try adding the final parameter for the Table.Group function. Before the end parentheses, add ", GroupKind.Local".

 

--Nate

View solution in original post

2 REPLIES 2
ctien
New Member

Hi Nate,  Many thanks for your prompt response.   i works perfectly.  Calvin

Anonymous
Not applicable

Try adding the final parameter for the Table.Group function. Before the end parentheses, add ", GroupKind.Local".

 

--Nate

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 Kudoed Authors