Skip to Content
0
Sep 04, 2019 at 12:53 PM

BEX Query Designer: Top N or Maximum sale based on two characteristics

89 Views

Hi,

I want to calculate the Top N or maximum sale per contract and UNSPSC Code. I'm not sure how to do this in BEx Query Designer.

My data is:

Contract; UNSPSC code; Sale

4700000014; 42181605; 100095,7

4700000014; 42181500; 43794

4700000014; 42181801; 31375

4700000014; 41112212; 18000

4700000014; 42181602; 12134

4700000014; 73171602; 10114

4700000026; 42291613; 258677,88

4700000026; 42291621; 8140

4700000026; 42182413; 2134,96

4700000026; 42291606; 1201,1

The end result should be the maximum sale based on UNSPSC code per Contract:

Contract; UNSPSC code; Sale

4700000014; 42181605; 100095,7

4700000026; 42291613; 258677,88

Best regards

Morten