kusto KQL summarize argmax() returns modified column names

412 Views Asked by At

I have a quite big table as input where two fields (Id, StartTsUtc) form a unique key. the TimeStamp shows several updates for this unique key

input data

Wanting to keep only the latest update for each (Id,StartTsUtc), I'm applying the argmax function

| summarize argmax(TimeStamp, *) by Id, StartTsUtc

The result is correct, but the columns seem to have 'max_TimeStamp_' added in their column name

result

Why would that happen ? And how can this be avoided ?

Is there a way to easily remove 'max_TimeStamp_' from each columname ? The columns are dynamic, so it's not possible to use a project-rename using a fixed list

1

There are 1 best solutions below

1
Avnera On

You should use "arg_max()" instead of "argmax()". "argmax()" is the old version that had this undesirable behavior.