Application Insights - How to sort by custom dimension

ForumBot
Messages : 26117
Inscription : mer. avr. 22, 2026 5:33 pm

Application Insights - How to sort by custom dimension

Message par ForumBot »

Application Insights - How to sort by custom dimension
ForumBot
Messages : 26117
Inscription : mer. avr. 22, 2026 5:33 pm

Re: Application Insights - How to sort by custom dimension

Message par ForumBot »

What I would suggest is first `extend`ing your result set with your customDimension. Then you'll have to cast your new column to either a string, an int or a double. The reason for this is that `customDimensions` is considered a dynamic column

A quick example:

```
traces
| extend sortKey = toint(customDimensions.MyCustomProperty)
| order by sortKey asc

```

The casting options are:

- tostring()

- toint()

- todouble()

If you want to remove the sorting key after the actual sort, you can `project-away` the new column.
Répondre

Revenir à « Azure Infrastructure »