<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Correlations on Grafana Labs</title><link>https://grafana.com/docs/grafana/v12.4/administration/correlations/</link><description>Recent content in Correlations on Grafana Labs</description><generator>Hugo -- gohugo.io</generator><language>en</language><atom:link href="/docs/grafana/v12.4/administration/correlations/index.xml" rel="self" type="application/rss+xml"/><item><title>Correlation</title><link>https://grafana.com/docs/grafana/v12.4/administration/correlations/correlation-configuration/</link><pubDate>Fri, 03 Apr 2026 12:35:46 -0500</pubDate><guid>https://grafana.com/docs/grafana/v12.4/administration/correlations/correlation-configuration/</guid><content><![CDATA[&lt;h1 id=&#34;correlation&#34;&gt;Correlation&lt;/h1&gt;
&lt;p&gt;Each correlation is configured with the following options:&lt;/p&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;strong&gt;Label&lt;/strong&gt;&lt;/dt&gt;
&lt;dd&gt;Link label, shown in the visualization&lt;/dd&gt;
&lt;dt&gt;&lt;strong&gt;Description&lt;/strong&gt;&lt;/dt&gt;
&lt;dd&gt;Optional description&lt;/dd&gt;
&lt;dt&gt;&lt;strong&gt;Source data source&lt;/strong&gt;&lt;/dt&gt;
&lt;dd&gt;The source of results that have links displayed&lt;/dd&gt;
&lt;dt&gt;&lt;strong&gt;Results field&lt;/strong&gt;&lt;/dt&gt;
&lt;dd&gt;Defines where the link is shown in a visualization&lt;/dd&gt;
&lt;dt&gt;&lt;strong&gt;Target query&lt;/strong&gt;&lt;/dt&gt;
&lt;dd&gt;The target query run when a link is clicked&lt;/dd&gt;
&lt;dt&gt;&lt;strong&gt;Transformations&lt;/strong&gt;&lt;/dt&gt;
&lt;dd&gt;Optional manipulations to the source data included passed to the target query&lt;/dd&gt;
&lt;/dl&gt;
&lt;p&gt;Learn how to create correlations using the &lt;a href=&#34;../create-a-new-correlation/#create-a-correlation-in-administration-page&#34;&gt;Administration page&lt;/a&gt; or with &lt;a href=&#34;../create-a-new-correlation/#create-a-correlation-with-provisioning&#34;&gt;provisioning&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;source-data-source-and-result-field&#34;&gt;Source data source and result field&lt;/h2&gt;
&lt;p&gt;Links are shown in Explore visualizations for the results from the correlation’s source data source.
A link is assigned to one of the fields from the result provided in the correlation configuration (the results field).
Each visualization displays fields with links in a different way (&lt;a href=&#34;../use-correlations-in-visualizations/#correlations-in-logs-panel&#34;&gt;Correlations in Logs Panel&lt;/a&gt; and see &lt;a href=&#34;../use-correlations-in-visualizations/#correlations-in-table&#34;&gt;Correlations in Table&lt;/a&gt;).&lt;/p&gt;
&lt;h2 id=&#34;target-query&#34;&gt;Target query&lt;/h2&gt;
&lt;p&gt;The target query is run when a link is clicked in the visualization. You can use the query editor of the selected target data source to specify the target query. Source data results can be accessed inside the target query with variables.&lt;/p&gt;
&lt;h3 id=&#34;correlation-variables&#34;&gt;Correlation Variables&lt;/h3&gt;
&lt;p&gt;You can use variables inside the target query to access the source data related to the query.
Correlations use &lt;a href=&#34;../../../dashboards/variables/variable-syntax/&#34;&gt;Grafana variable syntax&lt;/a&gt;.
Variables are filled with values from the source results when the link is clicked. There are two types of variables you can use:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;../../../panels-visualizations/configure-data-links/#field-variables&#34;&gt;field variables&lt;/a&gt; (allows to access field values and labels)&lt;/li&gt;
&lt;li&gt;correlation variables (allows to access field values and transformations)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Example: If source results contain a field called “employee”, the value of the field can be accessed with:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A field variable ${__data.fields.employee}&lt;/li&gt;
&lt;li&gt;A correlation variable that maps the field value above to ${employee}&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In addition to mapping field values to shorter variable names, more correlation variables can be created by applying transformations to existing fields&lt;/p&gt;
&lt;p&gt;For more details, please see the example in &lt;a href=&#34;../use-variables-and-transformations/&#34;&gt;Use variables and transformations in a correlation&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Correlation creates a data link only if all variables have values in the selected data row. &lt;a href=&#34;/docs/grafana/latest/dashboards/variables/add-template-variables/#global-variables&#34;&gt;Global variables&lt;/a&gt; are exception to this rule and are not required to be filled in from the returned data. These variables are interpolated automatically by data sources.&lt;/p&gt;
&lt;h3 id=&#34;correlation-transformations&#34;&gt;Correlation Transformations&lt;/h3&gt;
&lt;p&gt;Correlations provide a way to extract more variables out of field values. The output of transformations is a set of new variables that can be accessed as any other variable.&lt;/p&gt;
&lt;p&gt;There are two types of transformations: logfmt and regular expression.&lt;/p&gt;
&lt;p&gt;Each transformation uses a selected field value as the input. The output of a transformation is a set of new variables based on the type and options of the transformation.&lt;/p&gt;
&lt;p&gt;For more details, please see the example in &lt;a href=&#34;../use-variables-and-transformations/&#34;&gt;Use variables and transformations in a correlation&lt;/a&gt; for more details.&lt;/p&gt;
&lt;h3 id=&#34;logfmt-transformation&#34;&gt;Logfmt transformation&lt;/h3&gt;
&lt;p&gt;The logfmt transformation deconstructs a field value containing text formatted with &lt;a href=&#34;https://brandur.org/logfmt&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;logfmt key/value pairs&lt;/a&gt;. Each pair becomes a variable with the key being the name of the variable.&lt;/p&gt;
&lt;p&gt;The logfmt transformation only requires specifying the input field name if you would like the transformation to apply to a different field than the results field.
Example output variables for field = “host=srv001 endpoint=/test app=foo”:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th style=&#34;text-align: left&#34;&gt;name&lt;/th&gt;
              &lt;th style=&#34;text-align: left&#34;&gt;value&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td style=&#34;text-align: left&#34;&gt;host&lt;/td&gt;
              &lt;td style=&#34;text-align: left&#34;&gt;srv001&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td style=&#34;text-align: left&#34;&gt;endpoint&lt;/td&gt;
              &lt;td style=&#34;text-align: left&#34;&gt;/test&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td style=&#34;text-align: left&#34;&gt;app&lt;/td&gt;
              &lt;td style=&#34;text-align: left&#34;&gt;foo&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;regular-expression-transformation&#34;&gt;Regular expression transformation&lt;/h3&gt;
&lt;p&gt;The regular expression transformation deconstructs a field value based on the provided regular expression.&lt;/p&gt;
&lt;p&gt;Regular expression transformation options:&lt;/p&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;strong&gt;field&lt;/strong&gt;&lt;/dt&gt;
&lt;dd&gt;Input field name&lt;/dd&gt;
&lt;dt&gt;&lt;strong&gt;expression&lt;/strong&gt;&lt;/dt&gt;
&lt;dd&gt;Regular expression. Named capture groups are mapped to variables matching the group name. If non-named matching groups are used a variable is created out of the first match. The value overrides the variable matching the input field or a new variable is created if mapValue is provided (check the example below)&lt;/dd&gt;
&lt;dt&gt;&lt;strong&gt;mapValue&lt;/strong&gt;&lt;/dt&gt;
&lt;dd&gt;Used with simple regex groups without named matching groups. By default, the first match overrides the variable with the name of the field that is used as the input. To change that default behavior you can specify the mapValue property. The provided name is used to create a new variable. This can be useful if your target query requires both the exact value and a part of the value extracted with the transformation.&lt;/dd&gt;
&lt;/dl&gt;
&lt;p&gt;Example: Assuming the selected field name is “employee” and the field value is “John Doe”.&lt;/p&gt;
&lt;p&gt;Various output variables based on expression and mapValue options:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th style=&#34;text-align: left&#34;&gt;expression&lt;/th&gt;
              &lt;th style=&#34;text-align: left&#34;&gt;mapValue&lt;/th&gt;
              &lt;th style=&#34;text-align: left&#34;&gt;output variables&lt;/th&gt;
              &lt;th style=&#34;text-align: left&#34;&gt;comment&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td style=&#34;text-align: left&#34;&gt;/\w&#43; (\w&#43;)/&lt;/td&gt;
              &lt;td style=&#34;text-align: left&#34;&gt;-&lt;/td&gt;
              &lt;td style=&#34;text-align: left&#34;&gt;employee=Doe&lt;/td&gt;
              &lt;td style=&#34;text-align: left&#34;&gt;No mapValue provided. The first matching is mapped to the existing field name variable (employee)&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td style=&#34;text-align: left&#34;&gt;/(\w&#43;) (\w&#43;)/&lt;/td&gt;
              &lt;td style=&#34;text-align: left&#34;&gt;name&lt;/td&gt;
              &lt;td style=&#34;text-align: left&#34;&gt;name=John&lt;/td&gt;
              &lt;td style=&#34;text-align: left&#34;&gt;The first matching is mapped to a new variable called “name”&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td style=&#34;text-align: left&#34;&gt;/(?\w&#43;) (?\w&#43;)/&lt;/td&gt;
              &lt;td style=&#34;text-align: left&#34;&gt;-&lt;/td&gt;
              &lt;td style=&#34;text-align: left&#34;&gt;firstName=John, lastName=Doe&lt;/td&gt;
              &lt;td style=&#34;text-align: left&#34;&gt;When named groups are used they are the names of the output variables and mapValue is ignored.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td style=&#34;text-align: left&#34;&gt;/(?\w&#43;) (?\w&#43;)/&lt;/td&gt;
              &lt;td style=&#34;text-align: left&#34;&gt;name&lt;/td&gt;
              &lt;td style=&#34;text-align: left&#34;&gt;firstName=John, lastName=Doe&lt;/td&gt;
              &lt;td style=&#34;text-align: left&#34;&gt;Same as above&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;]]></content><description>&lt;h1 id="correlation">Correlation&lt;/h1>
&lt;p>Each correlation is configured with the following options:&lt;/p>
&lt;dl>
&lt;dt>&lt;strong>Label&lt;/strong>&lt;/dt>
&lt;dd>Link label, shown in the visualization&lt;/dd>
&lt;dt>&lt;strong>Description&lt;/strong>&lt;/dt>
&lt;dd>Optional description&lt;/dd>
&lt;dt>&lt;strong>Source data source&lt;/strong>&lt;/dt>
&lt;dd>The source of results that have links displayed&lt;/dd>
&lt;dt>&lt;strong>Results field&lt;/strong>&lt;/dt>
&lt;dd>Defines where the link is shown in a visualization&lt;/dd>
&lt;dt>&lt;strong>Target query&lt;/strong>&lt;/dt>
&lt;dd>The target query run when a link is clicked&lt;/dd>
&lt;dt>&lt;strong>Transformations&lt;/strong>&lt;/dt>
&lt;dd>Optional manipulations to the source data included passed to the target query&lt;/dd>
&lt;/dl>
&lt;p>Learn how to create correlations using the &lt;a href="../create-a-new-correlation/#create-a-correlation-in-administration-page">Administration page&lt;/a> or with &lt;a href="../create-a-new-correlation/#create-a-correlation-with-provisioning">provisioning&lt;/a>.&lt;/p></description></item><item><title>Permissions</title><link>https://grafana.com/docs/grafana/v12.4/administration/correlations/correlation-permissions/</link><pubDate>Fri, 03 Apr 2026 12:35:46 -0500</pubDate><guid>https://grafana.com/docs/grafana/v12.4/administration/correlations/correlation-permissions/</guid><content><![CDATA[&lt;h1 id=&#34;permissions&#34;&gt;Permissions&lt;/h1&gt;
&lt;p&gt;Users with &lt;a href=&#34;../../roles-and-permissions/&#34;&gt;Viewer base role&lt;/a&gt; or with &lt;a href=&#34;../../roles-and-permissions/access-control/&#34;&gt;datasources:query RBAC role&lt;/a&gt; can:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Use correlations in Explore’s visualizations.&lt;/li&gt;
&lt;li&gt;List all available correlations in read-only mode.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Users with &lt;a href=&#34;../../roles-and-permissions/&#34;&gt;Admin base role&lt;/a&gt; or with &lt;a href=&#34;../../roles-and-permissions/access-control/&#34;&gt;datasources:write RBAC role&lt;/a&gt; can:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Add, edit and delete correlations.&lt;/li&gt;
&lt;/ul&gt;
]]></content><description>&lt;h1 id="permissions">Permissions&lt;/h1>
&lt;p>Users with &lt;a href="../../roles-and-permissions/">Viewer base role&lt;/a> or with &lt;a href="../../roles-and-permissions/access-control/">datasources:query RBAC role&lt;/a> can:&lt;/p>
&lt;ul>
&lt;li>Use correlations in Explore’s visualizations.&lt;/li>
&lt;li>List all available correlations in read-only mode.&lt;/li>
&lt;/ul>
&lt;p>Users with &lt;a href="../../roles-and-permissions/">Admin base role&lt;/a> or with &lt;a href="../../roles-and-permissions/access-control/">datasources:write RBAC role&lt;/a> can:&lt;/p></description></item><item><title>Add permissions to create new correlations</title><link>https://grafana.com/docs/grafana/v12.4/administration/correlations/add-permissions-to-create-new-correlations/</link><pubDate>Fri, 03 Apr 2026 12:35:46 -0500</pubDate><guid>https://grafana.com/docs/grafana/v12.4/administration/correlations/add-permissions-to-create-new-correlations/</guid><content><![CDATA[&lt;h1 id=&#34;add-permissions-to-create-new-correlations&#34;&gt;Add permissions to create new correlations&lt;/h1&gt;
&lt;h2 id=&#34;before-you-begin&#34;&gt;Before you begin&lt;/h2&gt;
&lt;p&gt;Adding access to create correlations for &lt;a href=&#34;../../roles-and-permissions/&#34;&gt;Viewers and Editors&lt;/a&gt; is available with &lt;a href=&#34;../../roles-and-permissions/access-control/&#34;&gt;Role-based access control&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;add-permissions-to-create-correlations&#34;&gt;Add permissions to create correlations&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;Go to the &lt;strong&gt;Administration&lt;/strong&gt; section in Grafana.&lt;/li&gt;
&lt;li&gt;Under &lt;strong&gt;Users and access&lt;/strong&gt;, open the &lt;strong&gt;Users&lt;/strong&gt; page.&lt;/li&gt;
&lt;li&gt;Select the user to be granted access to create correlations.&lt;/li&gt;
&lt;li&gt;Add &lt;em&gt;Data sources writer&lt;/em&gt; role.&lt;/li&gt;
&lt;/ol&gt;
]]></content><description>&lt;h1 id="add-permissions-to-create-new-correlations">Add permissions to create new correlations&lt;/h1>
&lt;h2 id="before-you-begin">Before you begin&lt;/h2>
&lt;p>Adding access to create correlations for &lt;a href="../../roles-and-permissions/">Viewers and Editors&lt;/a> is available with &lt;a href="../../roles-and-permissions/access-control/">Role-based access control&lt;/a>.&lt;/p>
&lt;h2 id="add-permissions-to-create-correlations">Add permissions to create correlations&lt;/h2>
&lt;ol>
&lt;li>Go to the &lt;strong>Administration&lt;/strong> section in Grafana.&lt;/li>
&lt;li>Under &lt;strong>Users and access&lt;/strong>, open the &lt;strong>Users&lt;/strong> page.&lt;/li>
&lt;li>Select the user to be granted access to create correlations.&lt;/li>
&lt;li>Add &lt;em>Data sources writer&lt;/em> role.&lt;/li>
&lt;/ol></description></item><item><title>Create a new correlation</title><link>https://grafana.com/docs/grafana/v12.4/administration/correlations/create-a-new-correlation/</link><pubDate>Fri, 03 Apr 2026 12:35:46 -0500</pubDate><guid>https://grafana.com/docs/grafana/v12.4/administration/correlations/create-a-new-correlation/</guid><content><![CDATA[&lt;h1 id=&#34;create-a-new-correlation&#34;&gt;Create a new correlation&lt;/h1&gt;
&lt;h2 id=&#34;before-you-begin&#34;&gt;Before you begin&lt;/h2&gt;
&lt;p&gt;Make sure you have permission to add new correlations. Only users with write permissions to data sources can define new correlations.&lt;/p&gt;
&lt;h2 id=&#34;create-a-correlation-in-explores-correlations-editor&#34;&gt;Create a correlation in Explore&amp;rsquo;s correlations editor&lt;/h2&gt;
&lt;p&gt;To learn more, refer to Explore&amp;rsquo;s &lt;a href=&#34;../../../explore/correlations-editor-in-explore/&#34;&gt;documentation&lt;/a&gt; about building correlations in Explore.&lt;/p&gt;
&lt;h2 id=&#34;create-a-correlation-in-administration-page&#34;&gt;Create a correlation in Administration page&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;Go to the &lt;strong&gt;Administration&lt;/strong&gt; section in Grafana.&lt;/li&gt;
&lt;li&gt;Under &lt;strong&gt;Plugins and data&lt;/strong&gt;, open the &lt;strong&gt;Correlations&lt;/strong&gt; page.&lt;/li&gt;
&lt;li&gt;Click the “Add” button in the top right corner.&lt;/li&gt;
&lt;li&gt;Provide a &lt;strong&gt;label&lt;/strong&gt; for the correlation.&lt;/li&gt;
&lt;li&gt;Provide an optional &lt;strong&gt;description&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Go to the next page.&lt;/li&gt;
&lt;li&gt;Provide &lt;strong&gt;target data source&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Provide &lt;strong&gt;target query&lt;/strong&gt; using variables.&lt;/li&gt;
&lt;li&gt;Go to the next page.&lt;/li&gt;
&lt;li&gt;Provide &lt;strong&gt;source data source&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Provide &lt;strong&gt;results field&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Add transformations if you need variables that are not fields in the source data source.&lt;/li&gt;
&lt;li&gt;Click “Add” to add a new transformation.&lt;/li&gt;
&lt;li&gt;Select the type of a transformation.&lt;/li&gt;
&lt;li&gt;Configure transformation depending on the selected type.&lt;/li&gt;
&lt;li&gt;Save correlation.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;You can edit correlation in the same way, but you cannot change the selected data sources.&lt;/p&gt;
&lt;h2 id=&#34;create-a-correlation-with-provisioning&#34;&gt;Create a correlation with provisioning&lt;/h2&gt;
&lt;p&gt;Provision correlations by extending provisioned data sources. Correlations are defined as a subsection of the source data source configuration:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;YAML&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-yaml&#34;&gt;datasources:
  - name: Data source name # source data source
    ...
    jsonData:
    ...
    correlations:
      - targetUID: uid
        label: &amp;#34;test&amp;#34;
        description: &amp;#34;...&amp;#34;
        type: query
        config:
          target:
            expr: &amp;#34;...&amp;#34;
          field: &amp;#34;name&amp;#34;
          transformations:
            - type: regex
              field: &amp;#34;test&amp;#34;
              expression: /\w&amp;#43;/
              mapValue: &amp;#34;other&amp;#34;
            - type: logfmt
              field: &amp;#34;test&amp;#34;
      - targetUID: uid2
        label: &amp;#34;test 2&amp;#34;
        description: &amp;#34;...&amp;#34;
        type: external
        config:
          target:
            url: &amp;#34;http://${example}&amp;#34;
          field: &amp;#34;name&amp;#34;&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Description of provisioning properties:&lt;/p&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;strong&gt;targetUID&lt;/strong&gt;&lt;/dt&gt;
&lt;dd&gt;Target data source UID&lt;/dd&gt;
&lt;dt&gt;&lt;strong&gt;label&lt;/strong&gt;&lt;/dt&gt;
&lt;dd&gt;Link label&lt;/dd&gt;
&lt;dt&gt;&lt;strong&gt;description&lt;/strong&gt;&lt;/dt&gt;
&lt;dd&gt;Optional description&lt;/dd&gt;
&lt;dt&gt;&lt;strong&gt;type&lt;/strong&gt;&lt;/dt&gt;
&lt;dd&gt;Correlation type. Valid values are &amp;ldquo;query&amp;rdquo; for linking to a data source query and &amp;ldquo;external&amp;rdquo; for linking to an external URL.&lt;/dd&gt;
&lt;dt&gt;&lt;strong&gt;config&lt;/strong&gt;&lt;/dt&gt;
&lt;dd&gt;Config object&lt;/dd&gt;
&lt;dt&gt;&lt;strong&gt;config.target&lt;/strong&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;a href=&#34;#determine-target-query-model-structure&#34;&gt;Target query model&lt;/a&gt;&lt;/dd&gt;
&lt;dt&gt;&lt;strong&gt;config.field&lt;/strong&gt;&lt;/dt&gt;
&lt;dd&gt;Name of the field where link is shown&lt;/dd&gt;
&lt;dt&gt;&lt;strong&gt;config.transformations (list)&lt;/strong&gt;&lt;/dt&gt;
&lt;dd&gt;List of transformation objects&lt;/dd&gt;
&lt;dt&gt;&lt;strong&gt;transformation.type&lt;/strong&gt;&lt;/dt&gt;
&lt;dd&gt;regex, or logfmt&lt;/dd&gt;
&lt;dt&gt;&lt;strong&gt;transformation.field&lt;/strong&gt;&lt;/dt&gt;
&lt;dd&gt;The field that will be transformed. If this is not defined, it will apply the transformation to the data from the correlation&amp;rsquo;s config.field.&lt;/dd&gt;
&lt;dt&gt;&lt;strong&gt;transformation.expression&lt;/strong&gt;&lt;/dt&gt;
&lt;dd&gt;Regex expression (regex transformation only)&lt;/dd&gt;
&lt;dt&gt;&lt;strong&gt;transformation.mapValue&lt;/strong&gt;&lt;/dt&gt;
&lt;dd&gt;New name of the variable from the first regex match (regex transformation only)&lt;/dd&gt;
&lt;/dl&gt;
&lt;h3 id=&#34;determine-target-query-model-structure&#34;&gt;Determine target query model structure&lt;/h3&gt;
&lt;p&gt;When you set up a correlation with admin page you can use the target query editor. When you use provisioning you may need to know the structure of the target query which may not be well documented depending on the plugin. Here is a quick step-by-step guide on how to determine the target query model:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Open Explore.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Select the data source you want to use as the target of the correlation.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Open the inspector tab and select “Query”.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Run a sample query.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Inspect results.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Look for the “queries” list object. Each object is created using the query model structure defined by the data source. You can use the same structure in your provisioning file.&lt;/p&gt;
&lt;figure
       class=&#34;figure-wrapper figure-wrapper__lightbox w-100p &#34;
       style=&#34;max-width: 600px;&#34;
       itemprop=&#34;associatedMedia&#34;
       itemscope=&#34;&#34;
       itemtype=&#34;http://schema.org/ImageObject&#34;
     &gt;&lt;a
           class=&#34;lightbox-link captioned&#34;
           href=&#34;/static/img/docs/correlations/determine-target-query-structure-inspector-10-0.png&#34;
           itemprop=&#34;contentUrl&#34;
         &gt;&lt;div class=&#34;img-wrapper w-100p h-auto&#34;&gt;&lt;img
             class=&#34;lazyload mb-0&#34;
             data-src=&#34;/static/img/docs/correlations/determine-target-query-structure-inspector-10-0.png&#34;data-srcset=&#34;/static/img/docs/correlations/determine-target-query-structure-inspector-10-0.png?w=320 320w, /static/img/docs/correlations/determine-target-query-structure-inspector-10-0.png?w=550 550w, /static/img/docs/correlations/determine-target-query-structure-inspector-10-0.png?w=750 750w, /static/img/docs/correlations/determine-target-query-structure-inspector-10-0.png?w=900 900w, /static/img/docs/correlations/determine-target-query-structure-inspector-10-0.png?w=1040 1040w, /static/img/docs/correlations/determine-target-query-structure-inspector-10-0.png?w=1240 1240w, /static/img/docs/correlations/determine-target-query-structure-inspector-10-0.png?w=1920 1920w&#34;data-sizes=&#34;auto&#34;alt=&#34;Query inspector with target query structure&#34;width=&#34;1178&#34;height=&#34;1574&#34;title=&#34;Query inspector with target query structure&#34;/&gt;
           &lt;noscript&gt;
             &lt;img
               src=&#34;/static/img/docs/correlations/determine-target-query-structure-inspector-10-0.png&#34;
               alt=&#34;Query inspector with target query structure&#34;width=&#34;1178&#34;height=&#34;1574&#34;title=&#34;Query inspector with target query structure&#34;/&gt;
           &lt;/noscript&gt;&lt;/div&gt;&lt;figcaption class=&#34;w-100p caption text-gray-13  &#34;&gt;Query inspector with target query structure&lt;/figcaption&gt;&lt;/a&gt;&lt;/figure&gt;
&lt;p&gt;The query model in this example is represented by the first entry in the queries list. Properties “refId” and “datasource” are added to all queries in runtime and can be omitted:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;JSON&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-json&#34;&gt;{
  &amp;#34;scenario_id&amp;#34;: &amp;#34;random_walk&amp;#34;,
  &amp;#34;alias&amp;#34;: &amp;#34;app&amp;#34;,
  &amp;#34;seriesCount: 2
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;
]]></content><description>&lt;h1 id="create-a-new-correlation">Create a new correlation&lt;/h1>
&lt;h2 id="before-you-begin">Before you begin&lt;/h2>
&lt;p>Make sure you have permission to add new correlations. Only users with write permissions to data sources can define new correlations.&lt;/p></description></item><item><title>Use variables and transformations in a correlation</title><link>https://grafana.com/docs/grafana/v12.4/administration/correlations/use-variables-and-transformations/</link><pubDate>Fri, 03 Apr 2026 12:35:46 -0500</pubDate><guid>https://grafana.com/docs/grafana/v12.4/administration/correlations/use-variables-and-transformations/</guid><content><![CDATA[&lt;h1 id=&#34;use-variables-and-transformations-in-a-correlation&#34;&gt;Use variables and transformations in a correlation&lt;/h1&gt;
&lt;h2 id=&#34;before-you-begin&#34;&gt;Before you begin&lt;/h2&gt;
&lt;p&gt;This example walks through creating a link in a test data source but the same principles apply to any data source.&lt;/p&gt;
&lt;p&gt;The example emulates a scenario with two data sources:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Logs containing lines in the format: “2020-01-01 10:00 level=error message=error service=app1.loginService” stored in a field named “msg”&lt;/li&gt;
&lt;li&gt;Metrics for application included in the service name of a log line (e.g. app1)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Instructions below show how to set up a link that can run metrics query for the host included in each log line with provisioning and regex transformation. Additionally, a link with a query containing the full name of the service is set up to demonstrate the logfmt transformation.&lt;/p&gt;
&lt;h2 id=&#34;use-variables-and-transformations-in-provisioning&#34;&gt;Use variables and transformations in provisioning&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Add the following provisioning configuration to your Grafana:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;YAML&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-yaml&#34;&gt;datasources:
  - name: Target
    uid: test-target
    type: testdata

  - name: Source
    uid: test-source
    type: testdata
  - name: Source
    uid: test-source
    type: testdata
    correlations:
      - targetUID: test-target
        label: App metrics
        description: Application HTTP request metrics
        config:
          type: query
          target:
            scenario_id: random_walk
            alias: $${application}
          field: msg
          transformations:
            - type: regex
              field: msg
              expression: service=(\w&amp;#43;)\.\w&amp;#43;
              mapValue: application
      - targetUID: test-target
        label: Service metrics
        description: Service metrics
        config:
          type: query
          target:
            scenario_id: random_walk
            alias: $${service}
          field: msg
          transformations:
            - type: logfmt
              field: msg&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Two data sources are created: Source (emulating logs data source) and Target (emulating metrics data source):&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A correlation called “App metrics” is created targeting the Target data source with its UID.
&lt;ul&gt;
&lt;li&gt;The label and description are provided as text&lt;/li&gt;
&lt;li&gt;Each correlation contains the following configuration:
&lt;ul&gt;
&lt;li&gt;Required correlation type (query)&lt;/li&gt;
&lt;li&gt;Target query matching test data source model&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;“App metrics” correlation contains the following configuration:
&lt;ul&gt;
&lt;li&gt;Alias is set to ${application} variable (note that in provisioning files $ is used to access environment variables so it has to be &lt;a href=&#34;../../provisioning/#using-environment-variables&#34;&gt;escaped&lt;/a&gt;).&lt;/li&gt;
&lt;li&gt;Regular expression transformation is created to extract values from “msg” field
&lt;ul&gt;
&lt;li&gt;Regular expression transformation is used to capture the application name from the full name of the service stored in the log line.&lt;/li&gt;
&lt;li&gt;The output of the transformation is mapped to a variable called “application”.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;“Service metrics” correlation is created in a similar way but with logfmt transformation to break down log message and access full name of the service (e.g. “app1.loginService”).
&lt;ul&gt;
&lt;li&gt;For example, when a logline “2020-01-01 10:00 level=error message=error service=app1.loginService” is provided as the input, the transformation produces new variables: level, message, and service.&lt;/li&gt;
&lt;li&gt;“service” variable is used as the alias in the target query.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Navigate to Explore and open “Source” data source.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Select the “Raw Frames” scenario and provide the following data frames to emulate returning log lines:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;JSON&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-json&#34;&gt;[
  {
    &amp;#34;meta&amp;#34;: {
      &amp;#34;preferredVisualisationType&amp;#34;: &amp;#34;logs&amp;#34;
    },
    &amp;#34;fields&amp;#34;: [
      {
        &amp;#34;name&amp;#34;: &amp;#34;time&amp;#34;,
        &amp;#34;values&amp;#34;: [1, 2]
      },
      {
        &amp;#34;name&amp;#34;: &amp;#34;msg&amp;#34;,
        &amp;#34;values&amp;#34;: [
          &amp;#34;level=error msg=error service=app1.loginService&amp;#34;,
          &amp;#34;level=debug msg=info service=app2.userProfileService&amp;#34;
        ]
      }
    ]
  }
]&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Run the query and open log details by clicking on the log line.&lt;/p&gt;
&lt;figure
       class=&#34;figure-wrapper figure-wrapper__lightbox w-100p &#34;
       style=&#34;max-width: 600px;&#34;
       itemprop=&#34;associatedMedia&#34;
       itemscope=&#34;&#34;
       itemtype=&#34;http://schema.org/ImageObject&#34;
     &gt;&lt;a
           class=&#34;lightbox-link captioned&#34;
           href=&#34;/static/img/docs/correlations/correlations-in-logs-panel-10-0.png&#34;
           itemprop=&#34;contentUrl&#34;
         &gt;&lt;div class=&#34;img-wrapper w-100p h-auto&#34;&gt;&lt;img
             class=&#34;lazyload mb-0&#34;
             data-src=&#34;/static/img/docs/correlations/correlations-in-logs-panel-10-0.png&#34;data-srcset=&#34;/static/img/docs/correlations/correlations-in-logs-panel-10-0.png?w=320 320w, /static/img/docs/correlations/correlations-in-logs-panel-10-0.png?w=550 550w, /static/img/docs/correlations/correlations-in-logs-panel-10-0.png?w=750 750w, /static/img/docs/correlations/correlations-in-logs-panel-10-0.png?w=900 900w, /static/img/docs/correlations/correlations-in-logs-panel-10-0.png?w=1040 1040w, /static/img/docs/correlations/correlations-in-logs-panel-10-0.png?w=1240 1240w, /static/img/docs/correlations/correlations-in-logs-panel-10-0.png?w=1920 1920w&#34;data-sizes=&#34;auto&#34;alt=&#34;Correlation links in Logs panel&#34;width=&#34;1122&#34;height=&#34;398&#34;title=&#34;Correlation links in Logs panel&#34;/&gt;
           &lt;noscript&gt;
             &lt;img
               src=&#34;/static/img/docs/correlations/correlations-in-logs-panel-10-0.png&#34;
               alt=&#34;Correlation links in Logs panel&#34;width=&#34;1122&#34;height=&#34;398&#34;title=&#34;Correlation links in Logs panel&#34;/&gt;
           &lt;/noscript&gt;&lt;/div&gt;&lt;figcaption class=&#34;w-100p caption text-gray-13  &#34;&gt;Correlation links in Logs panel&lt;/figcaption&gt;&lt;/a&gt;&lt;/figure&gt;
&lt;p&gt;A link “App metrics” and “Service metrics” show next to variables extracted out of the log line with transformations&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Click on the “App metrics” link.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;A split view is opened and the target query is run.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Notice how the application name from the log line is filled in as the alias property in the target query.&lt;/p&gt;
&lt;figure
       class=&#34;figure-wrapper figure-wrapper__lightbox w-100p &#34;
       style=&#34;max-width: 600px;&#34;
       itemprop=&#34;associatedMedia&#34;
       itemscope=&#34;&#34;
       itemtype=&#34;http://schema.org/ImageObject&#34;
     &gt;&lt;a
           class=&#34;lightbox-link captioned&#34;
           href=&#34;/static/img/docs/correlations/interpolated-target-query-10-0.png&#34;
           itemprop=&#34;contentUrl&#34;
         &gt;&lt;div class=&#34;img-wrapper w-100p h-auto&#34;&gt;&lt;img
             class=&#34;lazyload mb-0&#34;
             data-src=&#34;/static/img/docs/correlations/interpolated-target-query-10-0.png&#34;data-srcset=&#34;/static/img/docs/correlations/interpolated-target-query-10-0.png?w=320 320w, /static/img/docs/correlations/interpolated-target-query-10-0.png?w=550 550w, /static/img/docs/correlations/interpolated-target-query-10-0.png?w=750 750w, /static/img/docs/correlations/interpolated-target-query-10-0.png?w=900 900w, /static/img/docs/correlations/interpolated-target-query-10-0.png?w=1040 1040w, /static/img/docs/correlations/interpolated-target-query-10-0.png?w=1240 1240w, /static/img/docs/correlations/interpolated-target-query-10-0.png?w=1920 1920w&#34;data-sizes=&#34;auto&#34;alt=&#34;Interpolated target query&#34;width=&#34;1999&#34;height=&#34;684&#34;title=&#34;Interpolated target query&#34;/&gt;
           &lt;noscript&gt;
             &lt;img
               src=&#34;/static/img/docs/correlations/interpolated-target-query-10-0.png&#34;
               alt=&#34;Interpolated target query&#34;width=&#34;1999&#34;height=&#34;684&#34;title=&#34;Interpolated target query&#34;/&gt;
           &lt;/noscript&gt;&lt;/div&gt;&lt;figcaption class=&#34;w-100p caption text-gray-13  &#34;&gt;Interpolated target query&lt;/figcaption&gt;&lt;/a&gt;&lt;/figure&gt;
&lt;p&gt;This allows you to run a specific query based on the source results:&lt;/p&gt;
&lt;figure
       class=&#34;figure-wrapper figure-wrapper__lightbox w-100p &#34;
       style=&#34;max-width: 600px;&#34;
       itemprop=&#34;associatedMedia&#34;
       itemscope=&#34;&#34;
       itemtype=&#34;http://schema.org/ImageObject&#34;
     &gt;&lt;a
           class=&#34;lightbox-link captioned&#34;
           href=&#34;/static/img/docs/correlations/target-query-results-10-0.png&#34;
           itemprop=&#34;contentUrl&#34;
         &gt;&lt;div class=&#34;img-wrapper w-100p h-auto&#34;&gt;&lt;img
             class=&#34;lazyload mb-0&#34;
             data-src=&#34;/static/img/docs/correlations/target-query-results-10-0.png&#34;data-srcset=&#34;/static/img/docs/correlations/target-query-results-10-0.png?w=320 320w, /static/img/docs/correlations/target-query-results-10-0.png?w=550 550w, /static/img/docs/correlations/target-query-results-10-0.png?w=750 750w, /static/img/docs/correlations/target-query-results-10-0.png?w=900 900w, /static/img/docs/correlations/target-query-results-10-0.png?w=1040 1040w, /static/img/docs/correlations/target-query-results-10-0.png?w=1240 1240w, /static/img/docs/correlations/target-query-results-10-0.png?w=1920 1920w&#34;data-sizes=&#34;auto&#34;alt=&#34;Interpolated target query results&#34;width=&#34;1999&#34;height=&#34;1084&#34;title=&#34;Interpolated target query results&#34;/&gt;
           &lt;noscript&gt;
             &lt;img
               src=&#34;/static/img/docs/correlations/target-query-results-10-0.png&#34;
               alt=&#34;Interpolated target query results&#34;width=&#34;1999&#34;height=&#34;1084&#34;title=&#34;Interpolated target query results&#34;/&gt;
           &lt;/noscript&gt;&lt;/div&gt;&lt;figcaption class=&#34;w-100p caption text-gray-13  &#34;&gt;Interpolated target query results&lt;/figcaption&gt;&lt;/a&gt;&lt;/figure&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Go back to the source query and change raw frames’ preferred visualization type to “table” to see how links are displayed in a Table visualization.&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;JSON&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-json&#34;&gt;[
  {
    &amp;#34;meta&amp;#34;: {
      &amp;#34;preferredVisualisationType&amp;#34;: &amp;#34;table&amp;#34;
    },
    &amp;#34;fields&amp;#34;: [...]
  }
]&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Run the query and notice how links are created in the Table cell:&lt;/p&gt;
&lt;figure
       class=&#34;figure-wrapper figure-wrapper__lightbox w-100p &#34;
       style=&#34;max-width: 600px;&#34;
       itemprop=&#34;associatedMedia&#34;
       itemscope=&#34;&#34;
       itemtype=&#34;http://schema.org/ImageObject&#34;
     &gt;&lt;a
           class=&#34;lightbox-link captioned&#34;
           href=&#34;/static/img/docs/correlations/correlations-in-table-10-0.png&#34;
           itemprop=&#34;contentUrl&#34;
         &gt;&lt;div class=&#34;img-wrapper w-100p h-auto&#34;&gt;&lt;img
             class=&#34;lazyload mb-0&#34;
             data-src=&#34;/static/img/docs/correlations/correlations-in-table-10-0.png&#34;data-srcset=&#34;/static/img/docs/correlations/correlations-in-table-10-0.png?w=320 320w, /static/img/docs/correlations/correlations-in-table-10-0.png?w=550 550w, /static/img/docs/correlations/correlations-in-table-10-0.png?w=750 750w, /static/img/docs/correlations/correlations-in-table-10-0.png?w=900 900w, /static/img/docs/correlations/correlations-in-table-10-0.png?w=1040 1040w, /static/img/docs/correlations/correlations-in-table-10-0.png?w=1240 1240w, /static/img/docs/correlations/correlations-in-table-10-0.png?w=1920 1920w&#34;data-sizes=&#34;auto&#34;alt=&#34;Correlations links in table&#34;width=&#34;1544&#34;height=&#34;460&#34;title=&#34;Correlations links in table&#34;/&gt;
           &lt;noscript&gt;
             &lt;img
               src=&#34;/static/img/docs/correlations/correlations-in-table-10-0.png&#34;
               alt=&#34;Correlations links in table&#34;width=&#34;1544&#34;height=&#34;460&#34;title=&#34;Correlations links in table&#34;/&gt;
           &lt;/noscript&gt;&lt;/div&gt;&lt;figcaption class=&#34;w-100p caption text-gray-13  &#34;&gt;Correlations links in table&lt;/figcaption&gt;&lt;/a&gt;&lt;/figure&gt;
&lt;/li&gt;
&lt;/ol&gt;
]]></content><description>&lt;h1 id="use-variables-and-transformations-in-a-correlation">Use variables and transformations in a correlation&lt;/h1>
&lt;h2 id="before-you-begin">Before you begin&lt;/h2>
&lt;p>This example walks through creating a link in a test data source but the same principles apply to any data source.&lt;/p></description></item><item><title>Use correlations in visualizations</title><link>https://grafana.com/docs/grafana/v12.4/administration/correlations/use-correlations-in-visualizations/</link><pubDate>Fri, 03 Apr 2026 12:35:46 -0500</pubDate><guid>https://grafana.com/docs/grafana/v12.4/administration/correlations/use-correlations-in-visualizations/</guid><content><![CDATA[&lt;h1 id=&#34;use-correlations-in-visualizations&#34;&gt;Use correlations in visualizations&lt;/h1&gt;
&lt;h2 id=&#34;correlations-in-logs-panel&#34;&gt;Correlations in Logs Panel&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Setup a correlation.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Open Explore.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Select a data source that you chose as the source data source of the correlation.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Run a query that results in data containing fields required to build variables in the target query.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Expand log row details.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;If the selected row contains all the information required to build the target query a link appears in the “Links” section at the bottom.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Additional information about used variables and their values is shown next to each link.&lt;/p&gt;
&lt;figure
       class=&#34;figure-wrapper figure-wrapper__lightbox w-100p &#34;
       style=&#34;max-width: 600px;&#34;
       itemprop=&#34;associatedMedia&#34;
       itemscope=&#34;&#34;
       itemtype=&#34;http://schema.org/ImageObject&#34;
     &gt;&lt;a
           class=&#34;lightbox-link captioned&#34;
           href=&#34;/static/img/docs/correlations/correlations-in-logs-panel-10-0.png&#34;
           itemprop=&#34;contentUrl&#34;
         &gt;&lt;div class=&#34;img-wrapper w-100p h-auto&#34;&gt;&lt;img
             class=&#34;lazyload mb-0&#34;
             data-src=&#34;/static/img/docs/correlations/correlations-in-logs-panel-10-0.png&#34;data-srcset=&#34;/static/img/docs/correlations/correlations-in-logs-panel-10-0.png?w=320 320w, /static/img/docs/correlations/correlations-in-logs-panel-10-0.png?w=550 550w, /static/img/docs/correlations/correlations-in-logs-panel-10-0.png?w=750 750w, /static/img/docs/correlations/correlations-in-logs-panel-10-0.png?w=900 900w, /static/img/docs/correlations/correlations-in-logs-panel-10-0.png?w=1040 1040w, /static/img/docs/correlations/correlations-in-logs-panel-10-0.png?w=1240 1240w, /static/img/docs/correlations/correlations-in-logs-panel-10-0.png?w=1920 1920w&#34;data-sizes=&#34;auto&#34;alt=&#34;Correlation links in Logs panel&#34;width=&#34;1122&#34;height=&#34;398&#34;title=&#34;Correlation links in Logs panel&#34;/&gt;
           &lt;noscript&gt;
             &lt;img
               src=&#34;/static/img/docs/correlations/correlations-in-logs-panel-10-0.png&#34;
               alt=&#34;Correlation links in Logs panel&#34;width=&#34;1122&#34;height=&#34;398&#34;title=&#34;Correlation links in Logs panel&#34;/&gt;
           &lt;/noscript&gt;&lt;/div&gt;&lt;figcaption class=&#34;w-100p caption text-gray-13  &#34;&gt;Correlation links in Logs panel&lt;/figcaption&gt;&lt;/a&gt;&lt;/figure&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&#34;correlations-in-table&#34;&gt;Correlations in Table&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Setup a correlation.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Open Explore.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Select a data source that you chose as the source data source of the correlation.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Run a query that results in data containing fields required to build variables in the target query.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Links are added to cell rows in the column representing the field with the assigned link (&lt;a href=&#34;../correlation-configuration/#source-data-source-and-result-field&#34;&gt;the results field&lt;/a&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Cells containing multiple links accessible with a context menu.&lt;/p&gt;
&lt;figure
       class=&#34;figure-wrapper figure-wrapper__lightbox w-100p &#34;
       style=&#34;max-width: 600px;&#34;
       itemprop=&#34;associatedMedia&#34;
       itemscope=&#34;&#34;
       itemtype=&#34;http://schema.org/ImageObject&#34;
     &gt;&lt;a
           class=&#34;lightbox-link captioned&#34;
           href=&#34;/static/img/docs/correlations/correlations-in-table-10-0.png&#34;
           itemprop=&#34;contentUrl&#34;
         &gt;&lt;div class=&#34;img-wrapper w-100p h-auto&#34;&gt;&lt;img
             class=&#34;lazyload mb-0&#34;
             data-src=&#34;/static/img/docs/correlations/correlations-in-table-10-0.png&#34;data-srcset=&#34;/static/img/docs/correlations/correlations-in-table-10-0.png?w=320 320w, /static/img/docs/correlations/correlations-in-table-10-0.png?w=550 550w, /static/img/docs/correlations/correlations-in-table-10-0.png?w=750 750w, /static/img/docs/correlations/correlations-in-table-10-0.png?w=900 900w, /static/img/docs/correlations/correlations-in-table-10-0.png?w=1040 1040w, /static/img/docs/correlations/correlations-in-table-10-0.png?w=1240 1240w, /static/img/docs/correlations/correlations-in-table-10-0.png?w=1920 1920w&#34;data-sizes=&#34;auto&#34;alt=&#34;Correlations links in table&#34;width=&#34;1544&#34;height=&#34;460&#34;title=&#34;Correlations links in table&#34;/&gt;
           &lt;noscript&gt;
             &lt;img
               src=&#34;/static/img/docs/correlations/correlations-in-table-10-0.png&#34;
               alt=&#34;Correlations links in table&#34;width=&#34;1544&#34;height=&#34;460&#34;title=&#34;Correlations links in table&#34;/&gt;
           &lt;/noscript&gt;&lt;/div&gt;&lt;figcaption class=&#34;w-100p caption text-gray-13  &#34;&gt;Correlations links in table&lt;/figcaption&gt;&lt;/a&gt;&lt;/figure&gt;
&lt;/li&gt;
&lt;/ol&gt;
]]></content><description>&lt;h1 id="use-correlations-in-visualizations">Use correlations in visualizations&lt;/h1>
&lt;h2 id="correlations-in-logs-panel">Correlations in Logs Panel&lt;/h2>
&lt;ol>
&lt;li>
&lt;p>Setup a correlation.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Open Explore.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Select a data source that you chose as the source data source of the correlation.&lt;/p></description></item></channel></rss>