PowerQuery: How to return MAX DATE only if MAX DATE is unique

Sindrin

New Member
Joined
Jan 6, 2021
Messages
24
Office Version
  1. 2013
Platform
  1. Windows
Hi Guys,

I have 3 columns

1 - Unique ID
2 - Submission Date
3 - Status

I managed to pull the max date of the unique ID using :

GROUP BY :
Unique ID

NEW COLUMN:
Col Name: MaxDate, Operation: Max, Column Submt Date

THEN:
Expand All, each Max Date = Submission Date.

However I have instances where for a particular Unique ID there are multiple occurrence of the exact same date.

Is there a way to pull only a max date where the max date occurs once (e.g. not a max date deriving of the same exact dates)?

So final output would be:

1 - Unique list of Unique IDs
2 - Max Date (deriving from unique max dates, not from multiple exact same dates)
3 - Status related to the Max Date

Thank you in advance!

Prinz
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
Some sample data to test would help to solve this issue. Use the XL2BB function to post your data.
 
Upvote 0
Some sample data to test would help to solve this issue. Use the XL2BB function to post your data.
Hi Alan,

Unable to post the file as the file is related to bank transactions.

However the format of the file follows the below :

unique ID Submission date Status
BBH123 01/04/2021 Accepted
BBH456 01/04/2021 Rejected
BBH789 28/03/2021 Accepted
BBH456 28/03/2021 Accepted
BBH123 01/04/2021 Accepted
BBH789 28/03/2021 Accepted

The ideal output would be:

unique ID Submission date Status
BBH456 01/04/2021 Rejected
etc...

Plus any other unique ids with a unique max date.

The below unique ids will be excluded as there is no unique max date:

BBH123
BBH789

Thank you!
 
Upvote 0

Forum statistics

Threads
1,223,721
Messages
6,174,096
Members
452,542
Latest member
Bricklin

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