2017-06-06 10 views
3

年、月、日、時にレコードを集計するにはどうすればよいですか?アプリケーションの洞察AnalyticsでAzureアプリケーションの洞察 - タイムスタンプの一部で要約する

+1

[Application Insights Analytics](https://docs.microsoft.com/en-us/azure/application-insights/app-insights-analytics)を使用していますか?もしそうなら、[datepart](https://docs.microsoft.com/en-us/azure/application-insights/app-insights-analytics-reference#datepart)を試してください –

答えて

8

:日によって

requests 
| summarize count() by bin(timestamp, 1h) 

:時間によって

requests 
| summarize count() by bin(timestamp, 1d) 

requests 
    | summarize count() by bin(datepart("Month", timestamp), 1) 

ことで年間

ことで
requests 
    | summarize count() by bin(datepart("Year", timestamp), 1) 
+3

これにも別名があると言いたいだけです:startofday(タイムスタンプ)、startofweek、startofmonthおよびstartofyear。それは少し使いやすくする必要があります。 –