Forum Discussion
Mattias260
Feb 22, 2021Copper Contributor
Loganalytics - Query not able to create a chart?
Hi, I am pretty new with Azure LogAnalytics. I am running this Query and I get expected result. // Not reporting VMs // VMs that have not reported a heartbeat in the last 5 minutes. // To c...
loadedlouie270
Mar 25, 2021Copper Contributor
Digging a bit further i look into the query and exported into powerbi.
When i have done this the fields are has "text" fields....
So im guessing this is the problem with log analytics, its looking into it, but it sees the field as a "text" colunm instead of the "decimal Number" type of row...
I'm assuming that is is somehow related to a issue that log analytics reported a few weeks about a "missing" colunm...
I hope someone at microsoft, look at it and fix it.
When i have done this the fields are has "text" fields....
So im guessing this is the problem with log analytics, its looking into it, but it sees the field as a "text" colunm instead of the "decimal Number" type of row...
I'm assuming that is is somehow related to a issue that log analytics reported a few weeks about a "missing" colunm...
I hope someone at microsoft, look at it and fix it.
loadedlouie270
Mar 26, 2021Copper Contributor
And here is a quick fix,
Add the following line for each of your decimal values,
|extend cpu = todecimal(avg_cpu_percent_s)
Explaining what it does:
(extend command, follow by the name of the new colunm, in this case "cpu", provide a equal "=", and the command, "todecimal(nameofthecolumn).
this will create a new column and convert the avg_cpu_percent_s, to a decimal value, allowing the chart in log analytics to process it since it sees it in the new column as a number.
Hope it helps, and microsoft solve this, i manage a few subscriptions, and i got the same error in all of them, so its a wide spread bug to my opinion, and there will be more people complaining over time.
Hope this helps.