Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
amien
Specialist
Specialist

get corresponding value with result of MAX

i have this inline:

key, filenumber, value

1, 1200, 3445

1, 1201, 42235

1, 1202, 32

2, 1300, 1

2, 1301 ,2

then i have a pivot with a max. This will result in this:

key, MAX(value)

1, 42235

2, 2

now i want to add an another expression. I want the corresponding filenumber with the result of the MAX(value)

key, MAX(value), filenumber

1, 42235, 1201

2, 2, 1301

how would that expression be like? i want this also to work with MAX(value,2)

3 Replies
martin59
Specialist II
Specialist II

Hope that helps you

Not applicable

it works .. but is this really the best solution?

lkallioniemi
Partner - Contributor II
Partner - Contributor II


MAOL wrote:
it works .. but is this really the best solution? <div></div>


You can try this:

FirstSortedValue(filenumber,- value,1)

BR

Lasse