I'm trying to produce a hierarchical aggregation by using top-nested Kusto operator for export to xlsx and works well but i'm loosing my default order by "Class" and "Date" fields by using query:
Test | top-nested 25 of Class by sum(Value), top-nested 25 of Date by sum(Value)
my data in db xlsx file
expected result on this image (same as above but Order by Class) query:
Test | where (tolower(Class) == tolower('Väganläggning'))| summarize sum(Value) by Date | take 25
but i'm getting data with strange order for "Date" and "Class" like on this exported xlsx file (first "Date" 2029 year instead 2009 and so on)
Seems i need query like this
Test | where Class == prev(Class) | top-nested 25 of Class by sum(Value), top-nested 25 of Date by sum(Value)
but i'm not experienced in Kusto, so need help guys)



