Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi ,
I have below data.. How do I get Max value and MAx value category in same table in script I have tried RagneMax but didnt work..
| Year | Comp | Dept | Risk | Value | Max_value | Max Value Category |
| 2020 | C1 | D1 | Low Risk | 10 | 60 | Very High |
| 2020 | C1 | D1 | High Risk | 20 | ||
| 2020 | C1 | D1 | Very Low Risk | 30 | ||
| 2020 | C1 | D1 | Med Risk | 10 | ||
| 2020 | C1 | D1 | Very High | 60 |
In addition to the suggestion from @hanna_choi the aggregation load could be directly joined to the source-table, like here simplified (Key is the place-holder for the needed dimensionality):
t: load * from X;
left join(t)
load Key, max(...) as X, firstsortedvalue(...) as Y resident t group by Key;