Power query: How to join record by dates

ablattmann

New Member
Joined
May 12, 2022
Messages
3
Office Version
  1. 365
Platform
  1. Windows
Capture d’écran 2022-05-12 132218.png


I would like to group the occurences where the start date and end date are continous. Any idea how to do this in power query ?

Thanks in advance.
Best Regards,
Alain
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
Hi @ablattmann
It appears that you are wanting to do a Group By. In your query editor, in the Transform tab, select Group By. Select the Advance radial.

Then have your Groupings be Matricule and Code (click "Add Grouping" so that it brings up a second drop down box for your Code)
And your Aggregations create your new columns where your new Start Date is a Min of your Start Date and your new End Date is a Max of your End Date
 
Upvote 0
Thanks for your reply. If I understood correctly I should do this:

Capture d’écran 2022-05-12 163348.png


However If I do this I get this results:

Capture d’écran 2022-05-12 163517.png


Which unfortunately is not what i would like to get in my exemple above.

Best Regards,
Alain
 
Upvote 0
Can you provide a bit more detail on what you are looking to achieve in your Expected Results? What decides the entries that are kept?
 
Upvote 0

Forum statistics

Threads
1,223,666
Messages
6,173,672
Members
452,527
Latest member
ineedexcelhelptoday

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top