use*_*982 4 azure azure-application-insights
我有一个查询来找出使用特定产品版本的不同用户 ID 及其国家、机构名称、城市代码。我如何成功列出属性?下面的查询没有过滤掉唯一用户。
自定义事件 | 其中 customDimensions.["产品版本"] == "7.4" | 其中时间戳介于(datetime("2018-12-01T00:00:00.000Z")..datetime("2018-12-02T00:00:00.000Z")) | 项目 client_CountryOrRegion, user_Id, customDimensions.["Agency Name"], customDimensions.["Pseudo City Code"], customDimensions.["Product Version"]
更新:
使用 tostring() 方法时请使用别名。然后在项目命令中,使用别名而不是列名。
看看我的测试结果如下:
在项目语法之前,请使用summarize count() by client_CountryOrRegion, user_Id, customDimensions.["Agency Name"], customDimensions.["Pseudo City Code"], customDimensions.["Product Version"],然后使用 project 输出您喜欢的属性。
完成后的代码如下:
customEvents
| where customDimensions.["Product Version"] == "7.4"
| where timestamp between(datetime("2018-12-01T00:00:00.000Z")..datetime("2018-12-02T00:00:00.000Z"))
| summarize count() by client_CountryOrRegion, user_Id, customDimensions.["Agency Name"], customDimensions.["Pseudo City Code"], customDimensions.["Product Version"]
| project client_CountryOrRegion, user_Id, customDimensions.["Agency Name"], customDimensions.["Pseudo City Code"], customDimensions.["Product Version"]
Run Code Online (Sandbox Code Playgroud)
如果有任何问题,请告诉我。
| 归档时间: |
|
| 查看次数: |
4959 次 |
| 最近记录: |