Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
In the script, I need a column which displays the max of a set of values, for example
Location Value Max
London 1 6
London 5 6
London 6 6
New York 3 3
New York 2 3
Paris 5 5
Is there a way to create the third column? I need to do this in the script as there's some tricky aggr in the front end.
Thank you very much!
Load * From <>;
Join
Load
Location,
Max(Value) as Max
From <> Group By Location;
Data:
LOAD * INLINE [
Location, Value, Max
London, 1, 6
London, 5, 6
London, 6, 6
New York, 3, 3
New York, 2, 3
Paris, 5, 5
];
LOAD Location,max(Value) as New_Max resident Data Group by Location ;
Hi,
Try like this
Data:
LOAD
*,
If(Previous(Location) <> Location, Value, Peek('Max')) AS Max;
SELECT
*
FROM Table
ORDER BY Location, Value Desc;
Hope this helps you.
Regards,
Jagan.