I’ve got a KQL query, and I want to strip out the last row of data. However, the number of rows returned is variable, so I can’t use take
(aka limit
) because I don’t know what number to pass it.
Is there any way to get the number of rows returned and pass that to limit
?
3
Answers
I couldn't find any way to do this in one query, but How to convert row count result to another column in Kusto query inspired me to do it in two:
Firstly my table looks like :
You could do this in one query using below KQL query:
Output:
Fiddle.
Just to add in my answer here, you can do probably what you want with Windows functions and specifically next().