<?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: Is there a way to define dashboards variables with human-readable keys? in Dashboarding</title>
    <link>https://community.dynatrace.com/t5/Dashboarding/Is-there-a-way-to-define-dashboards-variables-with-human/m-p/272057#M4848</link>
    <description>&lt;P&gt;Not quite. You could have one variable that just deals with human readable values, but then handle the translation between human readable and internal ID within the DQL of your tiles. I have attached a sample dashboard that you can import (you'll have to change the extension to .json before importing). In this dashboard, we have a variable that is defined by the following query:&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;fetch dt.entity.host
| fields hostName=entityName(id, type:"dt.entity.host")
| limit 20 // limit for demo purposes only&lt;/LI-CODE&gt;&lt;P&gt;The variable only holds human-readable elements, the host name in this case. When a user selects a host name from the dropdown, the variable works together with the query I shared in the original reply to display the CPU utilization just for specified server.&lt;/P&gt;</description>
    <pubDate>Mon, 10 Mar 2025 21:24:10 GMT</pubDate>
    <dc:creator>marco_irmer</dc:creator>
    <dc:date>2025-03-10T21:24:10Z</dc:date>
    <item>
      <title>Is there a way to define dashboards variables with human-readable keys?</title>
      <link>https://community.dynatrace.com/t5/Dashboarding/Is-there-a-way-to-define-dashboards-variables-with-human/m-p/272053#M4845</link>
      <description>&lt;P&gt;Looking at the latest dashboards, I can see we can define dashboard variables, however I haven't found how to define variables as map where the key is a human readable string and the value is the actual value we want to use as the variable value.&lt;/P&gt;
&lt;P&gt;For example, we want to have a variable in the dashboard that displays host name (human readable) but actually references the host.id which is the value we want to use.&lt;/P&gt;
&lt;P&gt;Having a bunch of id's in a variable usually don't mean anything to people using dashboards since they they only know they host by their friendly name.&lt;/P&gt;
&lt;P&gt;Is there a way to do that? Thanks.&lt;/P&gt;</description>
      <pubDate>Tue, 11 Mar 2025 07:55:27 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Dashboarding/Is-there-a-way-to-define-dashboards-variables-with-human/m-p/272053#M4845</guid>
      <dc:creator>strudeau</dc:creator>
      <dc:date>2025-03-11T07:55:27Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to define dashboards variables with human-readable keys?</title>
      <link>https://community.dynatrace.com/t5/Dashboarding/Is-there-a-way-to-define-dashboards-variables-with-human/m-p/272054#M4846</link>
      <description>&lt;P&gt;I am not sure if this would meet your needs, but one method we use to accomplish this is to write DQL queries that incorporate the human readable entity name into the results, and then filter based on that. There's a handy function, &lt;A href="https://docs.dynatrace.com/docs/discover-dynatrace/references/dynatrace-query-language/functions/general-functions#entity-name" target="_self"&gt;entityName()&lt;/A&gt;, that can be used to add a field containing the human readable entity name.&lt;/P&gt;&lt;P&gt;Example (using a variable named 'hostVar')&lt;/P&gt;&lt;LI-CODE lang="cpp"&gt;timeseries avg(dt.host.cpu.usage), by: { dt.entity.host }
| fieldsAdd dt.entity.host.name = entityName(dt.entity.host)
| filter dt.entity.host.name == $hostVar // filter here based on variable value&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Mar 2025 20:16:48 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Dashboarding/Is-there-a-way-to-define-dashboards-variables-with-human/m-p/272054#M4846</guid>
      <dc:creator>marco_irmer</dc:creator>
      <dc:date>2025-03-10T20:16:48Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to define dashboards variables with human-readable keys?</title>
      <link>https://community.dynatrace.com/t5/Dashboarding/Is-there-a-way-to-define-dashboards-variables-with-human/m-p/272056#M4847</link>
      <description>&lt;P&gt;Ok, so what you are proposing is to actually define 2 variables, one shown (with friendly name) and one hidden with the values. The one with the values uses the friendly name to make a lookup. I will try it out. Thanks.&lt;/P&gt;</description>
      <pubDate>Mon, 10 Mar 2025 20:47:36 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Dashboarding/Is-there-a-way-to-define-dashboards-variables-with-human/m-p/272056#M4847</guid>
      <dc:creator>strudeau</dc:creator>
      <dc:date>2025-03-10T20:47:36Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to define dashboards variables with human-readable keys?</title>
      <link>https://community.dynatrace.com/t5/Dashboarding/Is-there-a-way-to-define-dashboards-variables-with-human/m-p/272057#M4848</link>
      <description>&lt;P&gt;Not quite. You could have one variable that just deals with human readable values, but then handle the translation between human readable and internal ID within the DQL of your tiles. I have attached a sample dashboard that you can import (you'll have to change the extension to .json before importing). In this dashboard, we have a variable that is defined by the following query:&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;fetch dt.entity.host
| fields hostName=entityName(id, type:"dt.entity.host")
| limit 20 // limit for demo purposes only&lt;/LI-CODE&gt;&lt;P&gt;The variable only holds human-readable elements, the host name in this case. When a user selects a host name from the dropdown, the variable works together with the query I shared in the original reply to display the CPU utilization just for specified server.&lt;/P&gt;</description>
      <pubDate>Mon, 10 Mar 2025 21:24:10 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Dashboarding/Is-there-a-way-to-define-dashboards-variables-with-human/m-p/272057#M4848</guid>
      <dc:creator>marco_irmer</dc:creator>
      <dc:date>2025-03-10T21:24:10Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to define dashboards variables with human-readable keys?</title>
      <link>https://community.dynatrace.com/t5/Dashboarding/Is-there-a-way-to-define-dashboards-variables-with-human/m-p/273914#M4905</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I could really do with this option as well. In my case i would use CSV, so if I had the option to give the value a "display name" that the user select on the dashboard, but the underlying query use the value as input.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Anne-Lis&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 31 Mar 2025 07:53:00 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Dashboarding/Is-there-a-way-to-define-dashboards-variables-with-human/m-p/273914#M4905</guid>
      <dc:creator>ANLTH</dc:creator>
      <dc:date>2025-03-31T07:53:00Z</dc:date>
    </item>
  </channel>
</rss>

