Search code examples
azureazure-application-insightsazure-data-explorerkql

render chart with different bars


I'm getting started with KQL and I can't figure out how to display different counts as different bars in my query.

dependencies
| extend contextId = tostring(customDimensions["ProcessFunction-Context ID"])
| extend rowsCount = toint(customDimensions["ProcessFunction-Context ID|RowsCount"])
| extend processedCount = toint(customDimensions["ProcessFunction-RowsInjected"])
| where contextId  == "b5edc9c5-1fd3-4c02-89dc-e446d28dec6f"
| project  rowsCount, processedCount
| render columnchart    

basically I want to display rowsCount and processedCount in different columns in the chart, but they are being displayed together:

enter image description here

The expected result is something like this:

enter image description here

What am I missing?


Solution

  • I've managed to 'solve' it:

    dependencies
    | extend contextId = tostring(customDimensions["ProcessFunction-Context ID"])
    | extend rowsCount = toint(customDimensions["ProcessFunction-Context ID|RowsCount"])
    | extend processedCount = toint(customDimensions["ProcessFunction-RowsInjected"])
    | where contextId  == "b5edc9c5-1fd3-4c02-89dc-e446d28dec6f"
    | project rowsCount, processedCount, timestamp
    | render columnchart kind=unstacked