Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have a problem to find a max value in distinct fields of the same record with rank position, just like max function, but in the same record.
LOAD
L1, N1, N2, N3, N4, N5, N6, N7, N8, N9, N10
FROM Table.txt (ansi, txt, delimiter is '\t', embedded labels, msq);
I would like to find the higuest value in N1..N10, the second higuest value, the third higuest value, etc
Thanks
Weber
Well, it's easy to find the maximum:
rangemax(N1, N2,N3, N4, ),
but you need to literally sort them by value... My recommendation would be to normalize the table (turning each row into 10 rows) and then sort as usual.
You could even combine them back into a single list afterwards, using function concat() - if you really wanted to have a single row with 10 values...
just a thought...
Oleg
Weber, could you please share your solution? I have a similar requirement.
Thanks,
Pavithra