You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/azure-monitor/visualize/workbooks-criteria.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,7 @@ ms.reviewer: gardnerjr
13
13
14
14
When a query depends on many parameters, then the query will be stalled until each of its parameters have been resolved. Sometimes a parameter could have a simple query that concatenates a string or performs a conditional evaluation. However these queries still make network calls to services that perform these basic operations and that increases the time it takes for a parameter to resolve a value. This results in long load times for complex workbooks.
15
15
16
-
Criteria Text parameters solve this issue, as an author can define a set of criteria based on previously specified parameters, which will be evaluated to provide a dynamic value. The main benefit of using Criteria parameters is that it has the ability to resolve values of previously specified parameters and perform simple conditional operations without making any network calls. Below is an example of such a use case.
16
+
Using criteria parameters, you can define a set of criteria based on previously specified parameters which will be evaluated to provide a dynamic value. The main benefit of using criteria parameters is that criteria parameters can resolve values of previously specified parameters and perform simple conditional operations without making any network calls. Below is an example of such a use case.
17
17
18
18
## Example
19
19
Consider the conditional query below:
@@ -33,7 +33,7 @@ This can be translated to a criteria text parameter like so:
33
33
34
34
In the image above, the conditions will be evaluated from top to bottom and the value of the parameter `isNetworkCounter` will take the value of which ever condition evaluates to true first. All conditions except for the default condition (the 'else' condition) can be reordered to get the desired outcome.
35
35
36
-
## Setting up criteria
36
+
## Set up criteria
37
37
1. Start with a workbook with at least one existing parameter in edit mode.
38
38
1. Choose Add parameters from the links within the workbook.
39
39
1. Select on the blue Add Parameter button.
@@ -46,7 +46,7 @@ In the image above, the conditions will be evaluated from top to bottom and the
46
46
1. Choose 'Save' from the toolbar to create the parameter.
47
47
48
48
> [!NOTE]
49
-
> The first parameter in the workbook will not show the `Criteria` tab
49
+
> The first parameter in the workbook will not show the `Criteria` tab.
50
50
51
51
:::image type="content" source="media/workbooks-criteria/workbooks-criteria-first-param.png" alt-text="Screenshot showing the first parameter.":::
52
52
@@ -56,7 +56,7 @@ In the image above, the conditions will be evaluated from top to bottom and the
56
56
- Parameter type: Text
57
57
- Required: checked
58
58
- Get data from: Criteria
59
-
1. A grid should appear, select on 'Edit' next to the blank text box, this will bring up a 'Criteria Settings' form. Refer to [Criteria Settings form](#criteria-settings-form) for the description of each field.
59
+
1. A grid appears. Select **Edit** next to the blank text box to open the 'Criteria Settings' form. Refer to [Criteria Settings form](#criteria-settings-form) for the description of each field.
60
60
61
61
:::image type="content" source="media/workbooks-criteria/workbooks-criteria-setting.png" alt-text="Screenshot showing the criteria settings form.":::
"json": "For example, you may have a string parameter named `selection` that was the result of a query or selection in a visualization that has the following value \r\n```json\r\n{selection:json}\r\n```\r\n\r\nUsing JSONPath, you could get individual values from that object:\r\n\r\nformat | result\r\n---|---\r\n`selection:$.series` | `{selection:$..series}`\r\n`selection:$.x` | `{selection:$..x}`\r\n`selection$.y`| `{selection:$..y}`"
"description": "The unique name for this workbook template instance"
62
+
}
63
+
}
64
+
},
65
+
"resources": [
66
+
{
67
+
"name": "[parameters('resourceName')]",
68
+
"type": "microsoft.insights/workbooktemplates",
69
+
"location": "[resourceGroup().location]",
70
+
"apiVersion": "2019-10-17-preview",
71
+
"dependsOn": [],
72
+
"properties": {
73
+
"priority": 1,
74
+
"galleries": [
75
+
{
76
+
"name": "A Workbook Template",
77
+
"category": "Deployed Templates",
78
+
"order": 100,
79
+
"type": "workbook",
80
+
"resourceType": "Azure Monitor"
81
+
}
82
+
],
83
+
"templateData": {
84
+
"version": "Notebook/1.0",
85
+
"items": [
86
+
{
87
+
"type": 1,
88
+
"content": {
89
+
"json": "## New workbook\n---\n\nWelcome to your new workbook. This area will display text formatted as markdown.\n\n\nWe've included a basic analytics query to get you started. Use the `Edit` button below each section to configure it or add more sections."
90
+
},
91
+
"name": "text - 2"
92
+
},
93
+
{
94
+
"type": 3,
95
+
"content": {
96
+
"version": "KqlItem/1.0",
97
+
"query": "union withsource=[\"$TableName\"] *\n| summarize Count=count() by TableName=[\"$TableName\"]\n| render barchart",
0 commit comments