Skip to Content
Oct 22, 2018 at 08:38 PM

how to find the 2nd smallest number



I have the following issue:

I have Items with StorageNumbers. The same item can be in different storage locations.

I set "Item" as a group and the column ST# won't be visible later.

ST#1 shows the lowest number in the group - Group ABC = 164, Group DEF = 150. (formular used here is: Minimum ({@ST#}, {MARA.MATNR})

Under ST#2 should be the 2nd smallest number in each group. I can't use the NthSmallest Number function because the value can be on different positions - see example - group ABC the value is on 2nd position, Group DEF is value is on 3rd position.

Does anyone have an idea how to find the 2nd smallest number on group level ? I guess it should be something like a loop maybe and stop if the next higher value is found ? I tried so many different things and nothing worked so far....Or is that not possible on group level ?

Thank you for your help Jacky


capture.png (11.7 kB)