在列中显示自定义维度值:KQL [英] Showing Custom Dimension Values into Columns: KQL

查看:60
本文介绍了在列中显示自定义维度值:KQL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

       我有两个问题:

        I have two questions:

1.是否可以将自定义尺寸值显示到列中并执行不同的操作,例如count,average等...

1. Is it possible to show custom dimensions values into columns and perform different operaitons like count , average and etc ...

customEvents
|其中name ==" NAME" 
|总结 MessageType = avg(toint(customMeasurements.MessageType)), OrganizationID = avg(toint(customMeasurements.OrganizationId))

customEvents
| where name == "NAME" 
| summarize MessageType=avg(toint(customMeasurements.MessageType)), OrganizationID=avg(toint(customMeasurements.OrganizationId))

在上方查询中,不会显示MessageType和organizationID的值,只能使用其名称创建列.

In Above Query,  values of MessageType and organizationID not appearing , only columns are being created by their names.

如何填充值?

2.在第二个问题中,OrganizaitonalID显示一些组织性.是否可以将此值转换为String(组织名称)并显示为列?

2. In the second question , OrganizaitonalID showing some organizaiton. Is it possible to translate this value into String (Organizaiton Name) and showing into column?

谢谢.#

WSBukhari

WSBukhari

推荐答案

在第一个查询中,您需要替换"customMeasurements";与"customDimensions"一起使用如果该值可以转换为int,则它将显示在MessageType和OrganizationID列中,并且它们不再为空.

In the first query you'd need to replace "customMeasurements" with "customDimensions" and if the value can be cast to int, then it will appear in the columns MessageType and OrganizationID and they no longer be empty.

查询语言允许使用"|"来定义动态列.扩展columnName =值命令:

Query language allows to define dynamic columns, for instance, with "| extend columnName = value" command:

customEvents
| extend Org = tostring(customDimensions.OrganizationID)


这篇关于在列中显示自定义维度值:KQL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆