FIltering Records based on ID and max value

chergh

New Member
Joined
Nov 10, 2008
Messages
37
Office Version
  1. 365
Platform
  1. Windows
Hi,

I am trying to filter a data set shown in the dataset below.

What I want to do is return rows for an optionID but only for the highest LoadID associated with that option ID. So for the example below I would return any rows with a LoadID of '2' for OptionID "abc" and rows with a LoadID of '5' for OptionID "efg"

I am trying to do this with power query but haven't been able to figure it out.

Thanks in advance for any help.


excel.PNG
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
Just a regular excel worksheet solution, but what have you got to loose?
MrExcelPlayground5.xlsx
ABCDEFGHIJKLMNOPQ
1SolutionFormulas broken apart to see what is happening
2Load IDOptionIDSubOptionValueLoad IDOptionIDSubOptionValueabc2abc22abcx6
31abcx42abcx6efg5efg52abcy6
41abcy42abcy62abcz6
51abcz42abcz65efgg3
62abcx65efgg35efgd3
72abcy65efgd35efgf3
82abcz65efgf3
92efgd3
102efgf3
115efgg3
125efgd3
135efgf3
Sheet14
Cell Formulas
RangeFormula
K2:K3K2=UNIQUE(B3:B13)
L2:L3L2=MAXIFS(A3:A13,B3:B13,K2#)
M2:M3M2=K2#&L2#
N2:Q7N2=FILTER(A3:D13,NOT(ISNA(MATCH(B3:B13&A3:A13,M2#,0))))
F3:I8F3=FILTER(A3:D13,NOT(ISNA(MATCH(B3:B13&A3:A13,UNIQUE(B3:B13)&MAXIFS(A3:A13,B3:B13,K2#),0))))
Dynamic array formulas.
 
Upvote 0

Forum statistics

Threads
1,223,690
Messages
6,173,847
Members
452,535
Latest member
berdex

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