<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Metrics as Variables in Dashboarding</title>
    <link>https://community.dynatrace.com/t5/Dashboarding/Metrics-as-Variables/m-p/277146#M5049</link>
    <description>&lt;P&gt;Hi&lt;BR /&gt;&lt;BR /&gt;You should try using the &lt;A href="https://docs.dynatrace.com/docs/shortlink/dashboard-component-variable#variable-replacement" target="_self"&gt;":noquote"&lt;/A&gt;&amp;nbsp; option for variable replacement like this :&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;timeseries usage = percentile($Metric:noquote, 95, rollup: avg), by:{dt.entity.host}, from: -7d | limit 2&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 14 May 2025 07:46:38 GMT</pubDate>
    <dc:creator>GerardJ</dc:creator>
    <dc:date>2025-05-14T07:46:38Z</dc:date>
    <item>
      <title>Metrics as Variables</title>
      <link>https://community.dynatrace.com/t5/Dashboarding/Metrics-as-Variables/m-p/277128#M5048</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I am creating a dashbord for capacity management but I would like the metric to be selectable by a variable.&lt;/P&gt;&lt;P&gt;I currently have several variables created that allow me to filter by host entity tags and variables that allow me to select the metric type (avg, max, min).&amp;nbsp;&lt;SPAN&gt;The problem I am having is when trying to use the variables to select the metric.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I have a variable ($Metric) that contains:&lt;/SPAN&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN&gt;dt.host.cpu.usage &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;dt.host.memory.usage &lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;SPAN&gt;I want to use that variable in a simple DQL for example: &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;timeseries usage = percentile(dt.host.cpu.usage, 95, rollup: avg), by:{dt.entity.host}, from: -7d | limit 2 &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;That is:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;timeseries usage = percentile(&lt;STRONG&gt;$Metric&lt;/STRONG&gt;, 95, rollup: avg), by:{dt.entity.host}, from: -7d | limit 2 &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;When doing so I get an error: “The parameter has to be a metric key.” “queryString“: ‘timeseries usage = percentile(&lt;STRONG&gt;\’dt.host.cpu.usage\”&lt;/STRONG&gt;, 95, rollup: \“avg”), by:{dt.e.... &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I understand that the problem is how to parse the value of the variable to the query, is there any way to do it?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks a lot for your time&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Victor&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 14 May 2025 06:59:21 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Dashboarding/Metrics-as-Variables/m-p/277128#M5048</guid>
      <dc:creator>VictorRuiz</dc:creator>
      <dc:date>2025-05-14T06:59:21Z</dc:date>
    </item>
    <item>
      <title>Re: Metrics as Variables</title>
      <link>https://community.dynatrace.com/t5/Dashboarding/Metrics-as-Variables/m-p/277146#M5049</link>
      <description>&lt;P&gt;Hi&lt;BR /&gt;&lt;BR /&gt;You should try using the &lt;A href="https://docs.dynatrace.com/docs/shortlink/dashboard-component-variable#variable-replacement" target="_self"&gt;":noquote"&lt;/A&gt;&amp;nbsp; option for variable replacement like this :&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;timeseries usage = percentile($Metric:noquote, 95, rollup: avg), by:{dt.entity.host}, from: -7d | limit 2&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 May 2025 07:46:38 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Dashboarding/Metrics-as-Variables/m-p/277146#M5049</guid>
      <dc:creator>GerardJ</dc:creator>
      <dc:date>2025-05-14T07:46:38Z</dc:date>
    </item>
    <item>
      <title>Re: Metrics as Variables</title>
      <link>https://community.dynatrace.com/t5/Dashboarding/Metrics-as-Variables/m-p/277153#M5050</link>
      <description>&lt;P&gt;Works &lt;span class="lia-unicode-emoji" title=":vulcan_salute:"&gt;🖖&lt;/span&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Thanks a lot&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Victor&lt;/P&gt;</description>
      <pubDate>Wed, 14 May 2025 08:27:09 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Dashboarding/Metrics-as-Variables/m-p/277153#M5050</guid>
      <dc:creator>VictorRuiz</dc:creator>
      <dc:date>2025-05-14T08:27:09Z</dc:date>
    </item>
  </channel>
</rss>

