0

I am trying to get a visualization of the total number of specific resource over time in Azure resource graph.

For example, in 2018 total number of application insights were 10, in 2019 total is 20 and so on.

This is the query but it has to problems: 1- It does not aggregate the total number of the resource 2- It does not accept render timechart

resources
| where type == "microsoft.insights/components"
| extend CreationDate = todatetime(properties.CreationDate)
| summarize count() by bin(CreationDate, 365d)
Renm
  • 717
  • 3
  • 10
  • 20

1 Answers1

1

You need to add the resource to the by clause, for example if you have a column called "Resource" use this:

resources
| where type == "microsoft.insights/components"
| extend CreationDate = todatetime(properties.CreationDate)
| summarize count() by bin(CreationDate, 365d), Resource

Regarding the render timechart not working, did you check that you have data for more than 1 year? If so, can you provide more details of the app you are trying it in? Is that Application Insights?

Avnera
  • 7,088
  • 9
  • 14
  • Yes, I have 5 years of data, I am using azure resource graph. I have many different columns that I can call such as id, name, but that does not change anything, I do not get what was the total number of application insights instances we had in each year – Renm Sep 08 '21 at 15:15
  • Can you send a sample dataset using datatable()? It is not clear what is going wrong here and without more details it is impossible to answer. – Avnera Sep 09 '21 at 12:15