<?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: Filter by Management Zone using DQL in Dashboarding</title>
    <link>https://community.dynatrace.com/t5/Dashboarding/Filter-by-Management-Zone-using-DQL/m-p/241387#M3849</link>
    <description>&lt;P&gt;How do you use the query you've drafted above but for process group filtering by management zone? Below is the DQL query I have without filtering by management zone but would like the variable that I've created based on your above example to help filter out the process groups on each host in a specific mz:&lt;/P&gt;&lt;P&gt;Variable:&lt;/P&gt;&lt;LI-CODE lang="java"&gt;fetch dt.entity.process_group
| fields managementZones
| sort managementZones asc&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;DQL Query:&lt;/P&gt;&lt;LI-CODE lang="java"&gt;timeseries cpuUsage = avg(dt.process.cpu.usage), by:{host.name, dt.entity.process_group} 
| fieldsAdd pgname = lookup([fetch dt.entity.process_group], lookupField:id, sourceField:dt.entity.process_group)[entity.name]
| sort arrayAvg(cpuUsage) desc
| limit 5&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 28 Mar 2024 21:06:15 GMT</pubDate>
    <dc:creator>tonicbenn2023</dc:creator>
    <dc:date>2024-03-28T21:06:15Z</dc:date>
    <item>
      <title>Filter by Management Zone using DQL</title>
      <link>https://community.dynatrace.com/t5/Dashboarding/Filter-by-Management-Zone-using-DQL/m-p/232268#M3547</link>
      <description>&lt;P&gt;I have a widget on the new Dynatrace dashboard which displays the disk usage of servers. In our estate, we have filtered out servers through to their management zones. In the old dashboard format, you could filter servers by the management zone easily. However, in the newest one, there isn't such an option available so the next best thing is filtering through DQL. However, I cannot find such a command to do this. Any ideas?&lt;/P&gt;</description>
      <pubDate>Mon, 18 Dec 2023 17:21:10 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Dashboarding/Filter-by-Management-Zone-using-DQL/m-p/232268#M3547</guid>
      <dc:creator>badgerfifteen</dc:creator>
      <dc:date>2023-12-18T17:21:10Z</dc:date>
    </item>
    <item>
      <title>Re: Filter by Management Zone using DQL</title>
      <link>https://community.dynatrace.com/t5/Dashboarding/Filter-by-Management-Zone-using-DQL/m-p/232272#M3548</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/67521"&gt;@badgerfifteen&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;On the dashboard 3rd Gen, you can use variable as filters. And the DQL you can use could be this:&lt;/P&gt;&lt;P&gt;Variable:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;fetch dt.entity.host
| fields managementZones&lt;/LI-CODE&gt;&lt;P&gt;Dashboard:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;timeseries usage=avg(dt.host.disk.used), by:{dt.entity.host}
| lookup [ 
      fetch dt.entity.host
      | expand managementZones
    ], sourceField:dt.entity.host, lookupField:id, prefix:"mzone."
| filter mzone.managementZones == $VARIABLE_NAME&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;Example:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="cesarsaravia_0-1702923128967.png" style="width: 815px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/16320i2E6F17FB25CDF8C7/image-dimensions/815x127?v=v2" width="815" height="127" role="button" title="cesarsaravia_0-1702923128967.png" alt="cesarsaravia_0-1702923128967.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="cesarsaravia_1-1702923475834.png" style="width: 814px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/16321iE7790BF8F6E7B3EA/image-dimensions/814x293?v=v2" width="814" height="293" role="button" title="cesarsaravia_1-1702923475834.png" alt="cesarsaravia_1-1702923475834.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Dec 2023 18:18:24 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Dashboarding/Filter-by-Management-Zone-using-DQL/m-p/232272#M3548</guid>
      <dc:creator>cesarsaravia</dc:creator>
      <dc:date>2023-12-18T18:18:24Z</dc:date>
    </item>
    <item>
      <title>Re: Filter by Management Zone using DQL</title>
      <link>https://community.dynatrace.com/t5/Dashboarding/Filter-by-Management-Zone-using-DQL/m-p/238026#M3740</link>
      <description>&lt;P&gt;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/30478"&gt;@cesarsaravia&lt;/a&gt;&amp;nbsp;Can I do something similar to filter my open issues by management zone?&lt;/P&gt;</description>
      <pubDate>Fri, 23 Feb 2024 18:44:05 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Dashboarding/Filter-by-Management-Zone-using-DQL/m-p/238026#M3740</guid>
      <dc:creator>RPbiaggio</dc:creator>
      <dc:date>2024-02-23T18:44:05Z</dc:date>
    </item>
    <item>
      <title>Re: Filter by Management Zone using DQL</title>
      <link>https://community.dynatrace.com/t5/Dashboarding/Filter-by-Management-Zone-using-DQL/m-p/238041#M3741</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/67564"&gt;@RPbiaggio&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Here you have a list of dashboards created for GEN3&lt;BR /&gt;&lt;A href="https://github.com/TechShady/Dynatrace-Dashboards-Gen3" target="_blank"&gt;GitHub - TechShady/Dynatrace-Dashboards-Gen3: This repo provides Business Grade Dashboards for Dynatrace Gen3.&lt;/A&gt;&lt;BR /&gt;Also, here you have a Zip with the DQL for the problem analysis. You should have to modify it in order to get the MZone filter.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="cesarsaravia_0-1708725580983.png" style="width: 621px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/17826i8487694176CC675A/image-dimensions/621x308?v=v2" width="621" height="308" role="button" title="cesarsaravia_0-1708725580983.png" alt="cesarsaravia_0-1708725580983.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Feb 2024 22:01:28 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Dashboarding/Filter-by-Management-Zone-using-DQL/m-p/238041#M3741</guid>
      <dc:creator>cesarsaravia</dc:creator>
      <dc:date>2024-02-23T22:01:28Z</dc:date>
    </item>
    <item>
      <title>Re: Filter by Management Zone using DQL</title>
      <link>https://community.dynatrace.com/t5/Dashboarding/Filter-by-Management-Zone-using-DQL/m-p/238115#M3752</link>
      <description>&lt;P&gt;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/30478"&gt;@cesarsaravia&lt;/a&gt;&amp;nbsp;Hi!!&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Thanks for the response. I was already looking at this same dashboard. I still haven't been able to get data collection to work when I include management zones.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Feb 2024 12:38:12 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Dashboarding/Filter-by-Management-Zone-using-DQL/m-p/238115#M3752</guid>
      <dc:creator>RPbiaggio</dc:creator>
      <dc:date>2024-02-26T12:38:12Z</dc:date>
    </item>
    <item>
      <title>Re: Filter by Management Zone using DQL</title>
      <link>https://community.dynatrace.com/t5/Dashboarding/Filter-by-Management-Zone-using-DQL/m-p/238174#M3757</link>
      <description>&lt;P&gt;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/30478"&gt;@cesarsaravia&lt;/a&gt;An example of what I mentioned above. I got a ready-made template and I'm just trying to include the management zone, to be shown, but it returns null.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="RPbiaggio_1-1708964568456.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/17883i72F12176ED3CF67B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="RPbiaggio_1-1708964568456.png" alt="RPbiaggio_1-1708964568456.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;fetch events
| fieldsAdd tags = entity_tags, zonas = affected_entities.management_zones.names
| expand tags
| expand zonas
| filter event.kind == "DAVIS_PROBLEM" //and zonas == "FS: Aquisição Digital"
| sort timestamp desc

// Lookup for affected_entity_ids and root_cause_entity_id Start
| expand affected_entity_ids
| expand root_cause_entity_id
| lookup [fetch dt.entity.service], sourceField:affected_entity_ids, lookupField: id, prefix:"lookup.affected.entity.services"
| lookup [fetch dt.entity.service], sourceField:root_cause_entity_id, lookupField: id, prefix:"lookup.rootcause.entity.services"
| lookup [fetch dt.entity.process_group_instance], sourceField:affected_entity_ids, lookupField: id, prefix:"lookup.affected.entity.pgi"
| lookup [fetch dt.entity.process_group_instance], sourceField:root_cause_entity_id, lookupField: id, prefix:"lookup.rootcause.entity.pgi"
| lookup [fetch dt.entity.application], sourceField:affected_entity_ids, lookupField: id, prefix:"lookup.affected.entity.applications"
| lookup [fetch dt.entity.application], sourceField:root_cause_entity_id, lookupField: id, prefix:"lookup.rootcause.entity.applications"
| lookup [fetch dt.entity.mobile_application], sourceField:affected_entity_ids, lookupField: id, prefix:"lookup.affected.entity.mobile"
| lookup [fetch dt.entity.mobile_application], sourceField:root_cause_entity_id, lookupField: id, prefix:"lookup.rootcause.entity.mobile"
| lookup [fetch dt.entity.custom_application], sourceField:affected_entity_ids, lookupField: id, prefix:"lookup.affected.entity.customapplication"
| lookup [fetch dt.entity.custom_application], sourceField:root_cause_entity_id, lookupField: id, prefix:"lookup.rootcause.entity.customapplication"
| lookup [fetch dt.entity.cloud_application], sourceField:affected_entity_ids, lookupField: id, prefix:"lookup.affected.entity.cloudapplication"
| lookup [fetch dt.entity.cloud_application], sourceField:root_cause_entity_id, lookupField: id, prefix:"lookup.rootcause.entity.cloudapplication"
| lookup [fetch dt.entity.synthetic_test], sourceField:affected_entity_ids, lookupField: id, prefix:"lookup.affected.entity.synthetictest"
| lookup [fetch dt.entity.synthetic_test], sourceField:root_cause_entity_id, lookupField: id, prefix:"lookup.rootcause.entity.synthetictest"
| lookup [fetch dt.entity.http_check], sourceField:affected_entity_ids, lookupField: id, prefix:"lookup.affected.entity.httpcheck"
| lookup [fetch dt.entity.http_check], sourceField:root_cause_entity_id, lookupField: id, prefix:"lookup.rootcause.entity.httpcheck"
| lookup [fetch dt.entity.kubernetes_cluster], sourceField:affected_entity_ids, lookupField: id, prefix:"lookup.affected.entity.kubernetescluster"
| lookup [fetch dt.entity.kubernetes_cluster], sourceField:root_cause_entity_id, lookupField: id, prefix:"lookup.rootcause.entity.kubernetescluster"
| lookup [fetch dt.entity.host], sourceField:affected_entity_ids, lookupField: id, prefix:"lookup.affected.entity.hosts"
| lookup [fetch dt.entity.host], sourceField:root_cause_entity_id, lookupField: id, prefix:"lookup.rootcause.entity.hosts"
| lookup [fetch dt.entity.custom_device], sourceField:affected_entity_ids, lookupField: id, prefix:"lookup.affected.entity.customdevices"
| lookup [fetch dt.entity.custom_device], sourceField:root_cause_entity_id, lookupField: id, prefix:"lookup.rootcause.entity.customdevices"
| lookup [fetch dt.entity.hypervisor], sourceField:affected_entity_ids, lookupField: id, prefix:"lookup.affected.entity.hypervisor"
| lookup [fetch dt.entity.hypervisor], sourceField:root_cause_entity_id, lookupField: id, prefix:"lookup.rootcause.entity.hypervisor"
| lookup [fetch dt.entity.environment], sourceField:affected_entity_ids, lookupField: id, prefix:"lookup.affected.entity.environment"
// Lookup for affected_entity_ids and root_cause_entity_id End


| summarize {zonas = takeFirst(zonas),startTime = takeFirst(event.start),
            endTime = takeFirst(event.end),
            problemClosedDuration = takeFirst(resolved_problem_duration),
            status = takeFirst(event.status),
            event.name = takeFirst(event.name),
            severityLevel = takeFirst(event.category),
            affected = takeFirst(affected_entity_ids),
            rootCause = takeFirst(root_cause_entity_id),
            dt.davis.is_duplicate = takeFirst(dt.davis.is_duplicate),
            affectedServices = collectDistinct(lookup.affected.entity.servicesentity.name),
            affectedPGI = collectDistinct(lookup.affected.entity.pgientity.name),
            affectedApplications = collectDistinct(lookup.affected.entity.applicationsentity.name),
            affectedMobile = collectDistinct(lookup.affected.entity.mobileentity.name),
            affectedCustomApplication = collectDistinct(lookup.affected.entity.customapplicationentity.name),
            affectedCloudApplication = collectDistinct(lookup.affected.entity.cloudapplicationentity.name),
            affectedSyntheticTest = collectDistinct(lookup.affected.entity.synthetictestentity.name),
            affectedEntityZone = takeFirst(affected_entity.management_zones.names),
            affectedHttpCheck = collectDistinct(lookup.affected.entity.httpcheckentity.name),
            affectedKubernetesCluster = collectDistinct(lookup.affected.entity.kubernetesclusterentity.name),
            affectedHosts = collectDistinct(lookup.affected.entity.hostsentity.name),
            affectedCustomDevices = collectDistinct(lookup.affected.entity.customdevicesentity.name),
            affectedHypervisor = collectDistinct(lookup.affected.entity.hypervisorentity.name),
            affectedEnvironment = collectDistinct(lookup.affected.entity.environmententity.name),
            rootCauseServices = collectDistinct(lookup.rootcause.entity.servicesentity.name),
            rootCausePGI = collectDistinct(lookup.rootcause.entity.pgientity.name),
            rootCauseApplications = collectDistinct(lookup.rootcause.entity.applicationsentity.name),
            rootCauseMobile = collectDistinct(lookup.rootcause.entity.mobileentity.name),
            rootCauseCustomApplication = collectDistinct(lookup.rootcause.entity.customapplicationentity.name),
            rootCauseSyntheticTest = collectDistinct(lookup.rootcause.entity.synthetictestentity.name),
            rootCauseHttpCheck = collectDistinct(lookup.rootcause.entity.httpcheckentity.name),
            rootCauseHosts = collectDistinct(lookup.rootcause.entity.hostsentity.name),
            rootCauseCustomDevices = collectDistinct(lookup.rootcause.entity.customdevicesentity.name),
            event.id = takeFirst(event.id)}, 
            by:{display_id}
| filter `dt.davis.is_duplicate` == false
| fieldsAdd currentTime = toTimestamp(now())
| fieldsAdd status = if((status == "ACTIVE"),"OPEN", 
                else:if((status == "CLOSED"), "CLOSED"))

| fields zonas,Status = if((status == "OPEN"),"&lt;span class="lia-unicode-emoji" title=":red_circle:"&gt;🔴&lt;/span&gt; OPEN", 
                  else:if((status == "CLOSED"),"🟢 CLOSED")),
         Problem = concat(display_id," - ",event.name),         
         Severity = severityLevel,
         Type = (event.name),
         AffectedCount = arraySize(arrayRemoveNulls(arrayConcat(affectedApplications,affectedMobile,affectedCustomApplication,affectedCloudApplication,affectedSyntheticTest,affectedHttpCheck,affectedServices,affectedPGI,affectedKubernetesCluster,affectedHosts,affectedHypervisor,affectedCustomDevices,affectedEnvironment))),
         Affected = arrayRemoveNulls(arrayConcat(zonas,affectedApplications,affectedMobile,affectedCustomApplication,affectedCloudApplication,affectedSyntheticTest,affectedHttpCheck,affectedServices,affectedPGI,affectedKubernetesCluster,affectedHosts,affectedHypervisor,affectedCustomDevices,affectedEnvironment)),
         RootCause = arrayRemoveNulls(arrayConcat(rootCauseServices,rootCauseHosts)),
         StartTime = startTime,
         EndTime =  if((status == "OPEN"),"In Progress", 
                    else:if((status == "CLOSED"),endTime)),   
         `Duration (min)` = if((status == "CLOSED"),problemClosedDuration/60000000000,
                   else:if((status == "OPEN"), toLong(currentTime-startTime)/60000000000)),         
         event.id           
| sort StartTime, direction:"descending"
| sort Status, direction:"ascending"
&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Feb 2024 16:23:44 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Dashboarding/Filter-by-Management-Zone-using-DQL/m-p/238174#M3757</guid>
      <dc:creator>RPbiaggio</dc:creator>
      <dc:date>2024-02-26T16:23:44Z</dc:date>
    </item>
    <item>
      <title>Re: Filter by Management Zone using DQL</title>
      <link>https://community.dynatrace.com/t5/Dashboarding/Filter-by-Management-Zone-using-DQL/m-p/238327#M3769</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/67564"&gt;@RPbiaggio&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;After all the lookups, you must add this code and then get the right &lt;STRONG&gt;lookup.affected.entity.&lt;/STRONG&gt;...&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| fieldsAdd zonas = coalesce(lookup.affected.entity.hostsmanagementZones, lookup.affected.entity.hypervisormanagementZones,lookup.affected.entity.servicesmanagementZones)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;Example:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="cesarsaravia_0-1709074680370.png" style="width: 730px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/17915i3D07F9990178B666/image-dimensions/730x312?v=v2" width="730" height="312" role="button" title="cesarsaravia_0-1709074680370.png" alt="cesarsaravia_0-1709074680370.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Feb 2024 22:59:45 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Dashboarding/Filter-by-Management-Zone-using-DQL/m-p/238327#M3769</guid>
      <dc:creator>cesarsaravia</dc:creator>
      <dc:date>2024-02-27T22:59:45Z</dc:date>
    </item>
    <item>
      <title>Re: Filter by Management Zone using DQL</title>
      <link>https://community.dynatrace.com/t5/Dashboarding/Filter-by-Management-Zone-using-DQL/m-p/241387#M3849</link>
      <description>&lt;P&gt;How do you use the query you've drafted above but for process group filtering by management zone? Below is the DQL query I have without filtering by management zone but would like the variable that I've created based on your above example to help filter out the process groups on each host in a specific mz:&lt;/P&gt;&lt;P&gt;Variable:&lt;/P&gt;&lt;LI-CODE lang="java"&gt;fetch dt.entity.process_group
| fields managementZones
| sort managementZones asc&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;DQL Query:&lt;/P&gt;&lt;LI-CODE lang="java"&gt;timeseries cpuUsage = avg(dt.process.cpu.usage), by:{host.name, dt.entity.process_group} 
| fieldsAdd pgname = lookup([fetch dt.entity.process_group], lookupField:id, sourceField:dt.entity.process_group)[entity.name]
| sort arrayAvg(cpuUsage) desc
| limit 5&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Mar 2024 21:06:15 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Dashboarding/Filter-by-Management-Zone-using-DQL/m-p/241387#M3849</guid>
      <dc:creator>tonicbenn2023</dc:creator>
      <dc:date>2024-03-28T21:06:15Z</dc:date>
    </item>
    <item>
      <title>Re: Filter by Management Zone using DQL</title>
      <link>https://community.dynatrace.com/t5/Dashboarding/Filter-by-Management-Zone-using-DQL/m-p/241444#M3856</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/65736"&gt;@tonicbenn2023&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;You still can use your DQL for Mzone variables, but the DQL you should use for this scenario is:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;timeseries cpuUsage = avg(dt.process.cpu.usage), by:{host.name, dt.entity.process_group} 
| lookup [fetch dt.entity.process_group], lookupField:id, sourceField:dt.entity.process_group,prefix:"lookup.pg" //[entity.name]
| fieldsAdd lookup.pgentity.name,mzone= lookup.pgmanagementZones
| expand mzone
| filter toString(mzone)==$VARIABLE_MZONE
| sort arrayAvg(cpuUsage) desc
| limit 5&lt;/LI-CODE&gt;&lt;P&gt;Result:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="cesarsaravia_0-1711735381600.png" style="width: 713px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/18580i72E09DAF2E70A9B2/image-dimensions/713x168?v=v2" width="713" height="168" role="button" title="cesarsaravia_0-1711735381600.png" alt="cesarsaravia_0-1711735381600.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;</description>
      <pubDate>Fri, 29 Mar 2024 18:03:35 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Dashboarding/Filter-by-Management-Zone-using-DQL/m-p/241444#M3856</guid>
      <dc:creator>cesarsaravia</dc:creator>
      <dc:date>2024-03-29T18:03:35Z</dc:date>
    </item>
    <item>
      <title>Re: Filter by Management Zone using DQL</title>
      <link>https://community.dynatrace.com/t5/Dashboarding/Filter-by-Management-Zone-using-DQL/m-p/241499#M3861</link>
      <description>&lt;P&gt;Amazing! This worked, thank you :-)!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Apr 2024 13:38:16 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Dashboarding/Filter-by-Management-Zone-using-DQL/m-p/241499#M3861</guid>
      <dc:creator>tonicbenn2023</dc:creator>
      <dc:date>2024-04-01T13:38:16Z</dc:date>
    </item>
    <item>
      <title>Re: Filter by Management Zone using DQL</title>
      <link>https://community.dynatrace.com/t5/Dashboarding/Filter-by-Management-Zone-using-DQL/m-p/246420#M3984</link>
      <description>&lt;P&gt;Thanks for the help &lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/30478"&gt;@cesarsaravia&lt;/a&gt;&amp;nbsp;, if I don't bother you too much, I'd like to ask you how to filter the data in the dashboard above for a specific Management zone (in my case the Management Zone is a dynamic variable), couldn't figured it out where to add the filter statement.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is the query in DQL (same Davis Problems's Dashboard as&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/67564"&gt;@RPbiaggio&lt;/a&gt; )&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;fetch events&lt;BR /&gt;| fieldsAdd tags = entity_tags, zone = affected_entities.management_zones.names&lt;BR /&gt;| expand tags&lt;BR /&gt;| expand zone&lt;BR /&gt;| filter event.kind == "DAVIS_PROBLEM" //and zonas == "FS: Aquisição Digital"&lt;BR /&gt;| sort timestamp desc&lt;/P&gt;&lt;P&gt;// Lookup for affected_entity_ids and root_cause_entity_id Start&lt;BR /&gt;| expand affected_entity_ids&lt;BR /&gt;| expand root_cause_entity_id&lt;BR /&gt;| lookup [fetch dt.entity.service], sourceField:affected_entity_ids, lookupField: id, prefix:"lookup.affected.entity.services"&lt;BR /&gt;| lookup [fetch dt.entity.service], sourceField:root_cause_entity_id, lookupField: id, prefix:"lookup.rootcause.entity.services"&lt;BR /&gt;| lookup [fetch dt.entity.process_group_instance], sourceField:affected_entity_ids, lookupField: id, prefix:"lookup.affected.entity.pgi"&lt;BR /&gt;| lookup [fetch dt.entity.process_group_instance], sourceField:root_cause_entity_id, lookupField: id, prefix:"lookup.rootcause.entity.pgi"&lt;BR /&gt;| lookup [fetch dt.entity.application], sourceField:affected_entity_ids, lookupField: id, prefix:"lookup.affected.entity.applications"&lt;BR /&gt;| lookup [fetch dt.entity.application], sourceField:root_cause_entity_id, lookupField: id, prefix:"lookup.rootcause.entity.applications"&lt;BR /&gt;| lookup [fetch dt.entity.mobile_application], sourceField:affected_entity_ids, lookupField: id, prefix:"lookup.affected.entity.mobile"&lt;BR /&gt;| lookup [fetch dt.entity.mobile_application], sourceField:root_cause_entity_id, lookupField: id, prefix:"lookup.rootcause.entity.mobile"&lt;BR /&gt;| lookup [fetch dt.entity.custom_application], sourceField:affected_entity_ids, lookupField: id, prefix:"lookup.affected.entity.customapplication"&lt;BR /&gt;| lookup [fetch dt.entity.custom_application], sourceField:root_cause_entity_id, lookupField: id, prefix:"lookup.rootcause.entity.customapplication"&lt;BR /&gt;| lookup [fetch dt.entity.cloud_application], sourceField:affected_entity_ids, lookupField: id, prefix:"lookup.affected.entity.cloudapplication"&lt;BR /&gt;| lookup [fetch dt.entity.cloud_application], sourceField:root_cause_entity_id, lookupField: id, prefix:"lookup.rootcause.entity.cloudapplication"&lt;BR /&gt;| lookup [fetch dt.entity.synthetic_test], sourceField:affected_entity_ids, lookupField: id, prefix:"lookup.affected.entity.synthetictest"&lt;BR /&gt;| lookup [fetch dt.entity.synthetic_test], sourceField:root_cause_entity_id, lookupField: id, prefix:"lookup.rootcause.entity.synthetictest"&lt;BR /&gt;| lookup [fetch dt.entity.http_check], sourceField:affected_entity_ids, lookupField: id, prefix:"lookup.affected.entity.httpcheck"&lt;BR /&gt;| lookup [fetch dt.entity.http_check], sourceField:root_cause_entity_id, lookupField: id, prefix:"lookup.rootcause.entity.httpcheck"&lt;BR /&gt;| lookup [fetch dt.entity.kubernetes_cluster], sourceField:affected_entity_ids, lookupField: id, prefix:"lookup.affected.entity.kubernetescluster"&lt;BR /&gt;| lookup [fetch dt.entity.kubernetes_cluster], sourceField:root_cause_entity_id, lookupField: id, prefix:"lookup.rootcause.entity.kubernetescluster"&lt;BR /&gt;| lookup [fetch dt.entity.host], sourceField:affected_entity_ids, lookupField: id, prefix:"lookup.affected.entity.hosts"&lt;BR /&gt;| lookup [fetch dt.entity.host], sourceField:root_cause_entity_id, lookupField: id, prefix:"lookup.rootcause.entity.hosts"&lt;BR /&gt;| lookup [fetch dt.entity.custom_device], sourceField:affected_entity_ids, lookupField: id, prefix:"lookup.affected.entity.customdevices"&lt;BR /&gt;| lookup [fetch dt.entity.custom_device], sourceField:root_cause_entity_id, lookupField: id, prefix:"lookup.rootcause.entity.customdevices"&lt;BR /&gt;| lookup [fetch dt.entity.hypervisor], sourceField:affected_entity_ids, lookupField: id, prefix:"lookup.affected.entity.hypervisor"&lt;BR /&gt;| lookup [fetch dt.entity.hypervisor], sourceField:root_cause_entity_id, lookupField: id, prefix:"lookup.rootcause.entity.hypervisor"&lt;BR /&gt;| lookup [fetch dt.entity.environment], sourceField:affected_entity_ids, lookupField: id, prefix:"lookup.affected.entity.environment"&lt;BR /&gt;// Lookup for affected_entity_ids and root_cause_entity_id End&lt;/P&gt;&lt;P&gt;| fieldsAdd zone = coalesce(lookup.affected.entity.hostsmanagementZones, lookup.affected.entity.hypervisormanagementZones,lookup.affected.entity.servicesmanagementZones)&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;// | summarize {zone = takeFirst(zone),startTime = takeFirst(event.start),&lt;BR /&gt;| summarize {zone = takeFirst(zone),startTime = takeFirst(event.start),&lt;BR /&gt;endTime = takeFirst(event.end),&lt;BR /&gt;problemClosedDuration = takeFirst(resolved_problem_duration),&lt;BR /&gt;status = takeFirst(event.status),&lt;BR /&gt;event.name = takeFirst(event.name),&lt;BR /&gt;severityLevel = takeFirst(event.category),&lt;BR /&gt;affected = takeFirst(affected_entity_ids),&lt;BR /&gt;rootCause = takeFirst(root_cause_entity_id),&lt;BR /&gt;dt.davis.is_duplicate = takeFirst(dt.davis.is_duplicate),&lt;BR /&gt;affectedServices = collectDistinct(lookup.affected.entity.servicesentity.name),&lt;BR /&gt;affectedPGI = collectDistinct(lookup.affected.entity.pgientity.name),&lt;BR /&gt;affectedApplications = collectDistinct(lookup.affected.entity.applicationsentity.name),&lt;BR /&gt;affectedMobile = collectDistinct(lookup.affected.entity.mobileentity.name),&lt;BR /&gt;affectedCustomApplication = collectDistinct(lookup.affected.entity.customapplicationentity.name),&lt;BR /&gt;affectedCloudApplication = collectDistinct(lookup.affected.entity.cloudapplicationentity.name),&lt;BR /&gt;affectedSyntheticTest = collectDistinct(lookup.affected.entity.synthetictestentity.name),&lt;BR /&gt;affectedEntityZone = takeFirst(affected_entity.management_zones.names),&lt;BR /&gt;affectedHttpCheck = collectDistinct(lookup.affected.entity.httpcheckentity.name),&lt;BR /&gt;affectedKubernetesCluster = collectDistinct(lookup.affected.entity.kubernetesclusterentity.name),&lt;BR /&gt;affectedHosts = collectDistinct(lookup.affected.entity.hostsentity.name),&lt;BR /&gt;affectedCustomDevices = collectDistinct(lookup.affected.entity.customdevicesentity.name),&lt;BR /&gt;affectedHypervisor = collectDistinct(lookup.affected.entity.hypervisorentity.name),&lt;BR /&gt;affectedEnvironment = collectDistinct(lookup.affected.entity.environmententity.name),&lt;BR /&gt;rootCauseServices = collectDistinct(lookup.rootcause.entity.servicesentity.name),&lt;BR /&gt;rootCausePGI = collectDistinct(lookup.rootcause.entity.pgientity.name),&lt;BR /&gt;rootCauseApplications = collectDistinct(lookup.rootcause.entity.applicationsentity.name),&lt;BR /&gt;rootCauseMobile = collectDistinct(lookup.rootcause.entity.mobileentity.name),&lt;BR /&gt;rootCauseCustomApplication = collectDistinct(lookup.rootcause.entity.customapplicationentity.name),&lt;BR /&gt;rootCauseSyntheticTest = collectDistinct(lookup.rootcause.entity.synthetictestentity.name),&lt;BR /&gt;rootCauseHttpCheck = collectDistinct(lookup.rootcause.entity.httpcheckentity.name),&lt;BR /&gt;rootCauseHosts = collectDistinct(lookup.rootcause.entity.hostsentity.name),&lt;BR /&gt;rootCauseCustomDevices = collectDistinct(lookup.rootcause.entity.customdevicesentity.name),&lt;BR /&gt;event.id = takeFirst(event.id)},&lt;BR /&gt;by:{display_id}&lt;BR /&gt;| filter `dt.davis.is_duplicate` == false&lt;BR /&gt;| fieldsAdd currentTime = toTimestamp(now())&lt;BR /&gt;| fieldsAdd status = if((status == "ACTIVE"),"OPEN",&lt;BR /&gt;else:if((status == "CLOSED"), "CLOSED"))&lt;/P&gt;&lt;P&gt;| fields zone,Status = if((status == "OPEN")," OPEN",&lt;BR /&gt;else:if((status == "CLOSED"),"🟢 CLOSED")),&lt;BR /&gt;Problem = concat(display_id," - ",event.name),&lt;BR /&gt;Severity = severityLevel,&lt;BR /&gt;Type = (event.name),&lt;BR /&gt;AffectedCount = arraySize(arrayRemoveNulls(arrayConcat(affectedApplications,affectedMobile,affectedCustomApplication,affectedCloudApplication,affectedSyntheticTest,affectedHttpCheck,affectedServices,affectedPGI,affectedKubernetesCluster,affectedHosts,affectedHypervisor,affectedCustomDevices,affectedEnvironment))),&lt;BR /&gt;Affected = arrayRemoveNulls(arrayConcat(zone,affectedApplications,affectedMobile,affectedCustomApplication,affectedCloudApplication,affectedSyntheticTest,affectedHttpCheck,affectedServices,affectedPGI,affectedKubernetesCluster,affectedHosts,affectedHypervisor,affectedCustomDevices,affectedEnvironment)),&lt;BR /&gt;RootCause = arrayRemoveNulls(arrayConcat(rootCauseServices,rootCauseHosts)),&lt;BR /&gt;StartTime = startTime,&lt;BR /&gt;EndTime = if((status == "OPEN"),"In Progress",&lt;BR /&gt;else:if((status == "CLOSED"),endTime)),&lt;BR /&gt;`Duration (min)` = if((status == "CLOSED"),problemClosedDuration/60000000000,&lt;BR /&gt;else:if((status == "OPEN"), toLong(currentTime-startTime)/60000000000)),&lt;BR /&gt;event.id&lt;BR /&gt;| sort StartTime, direction:"descending"&lt;BR /&gt;| sort Status, direction:"ascending"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My dynamic variable name is called&amp;nbsp; &lt;STRONG&gt;MZ&lt;/STRONG&gt; and the query is this one&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;fetch dt.entity.host&lt;BR /&gt;| expand managementZones&lt;BR /&gt;| fields managementZones&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 23 May 2024 15:25:34 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Dashboarding/Filter-by-Management-Zone-using-DQL/m-p/246420#M3984</guid>
      <dc:creator>andruccioli50</dc:creator>
      <dc:date>2024-05-23T15:25:34Z</dc:date>
    </item>
    <item>
      <title>Re: Filter by Management Zone using DQL</title>
      <link>https://community.dynatrace.com/t5/Dashboarding/Filter-by-Management-Zone-using-DQL/m-p/246455#M3985</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/30478"&gt;@cesarsaravia&lt;/a&gt;&amp;nbsp; sorry to bother you, I'd like to ask you another thing on the same dashboard you were looking with&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/67564"&gt;@RPbiaggio&lt;/a&gt;&amp;nbsp; , how can I manage to filter data inside the Dashboard only for the Management Zone specified in a dynamic variable?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is my variable (called MZ)&lt;/P&gt;&lt;P&gt;fetch dt.entity.host&lt;BR /&gt;| expand managementZones&lt;BR /&gt;| fields managementZones&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is my dashboard, the same as RPBiaggio:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;fetch events&lt;BR /&gt;| fieldsAdd tags = entity_tags, zone = affected_entities.management_zones.names&lt;BR /&gt;| expand tags&lt;BR /&gt;| expand zone&lt;BR /&gt;| filter event.kind == "DAVIS_PROBLEM" //and zonas == "FS: Aquisição Digital"&lt;BR /&gt;| sort timestamp desc&lt;/P&gt;&lt;P&gt;// Lookup for affected_entity_ids and root_cause_entity_id Start&lt;BR /&gt;| expand affected_entity_ids&lt;BR /&gt;| expand root_cause_entity_id&lt;BR /&gt;| lookup [fetch dt.entity.service], sourceField:affected_entity_ids, lookupField: id, prefix:"lookup.affected.entity.services"&lt;BR /&gt;| lookup [fetch dt.entity.service], sourceField:root_cause_entity_id, lookupField: id, prefix:"lookup.rootcause.entity.services"&lt;BR /&gt;| lookup [fetch dt.entity.process_group_instance], sourceField:affected_entity_ids, lookupField: id, prefix:"lookup.affected.entity.pgi"&lt;BR /&gt;| lookup [fetch dt.entity.process_group_instance], sourceField:root_cause_entity_id, lookupField: id, prefix:"lookup.rootcause.entity.pgi"&lt;BR /&gt;| lookup [fetch dt.entity.application], sourceField:affected_entity_ids, lookupField: id, prefix:"lookup.affected.entity.applications"&lt;BR /&gt;| lookup [fetch dt.entity.application], sourceField:root_cause_entity_id, lookupField: id, prefix:"lookup.rootcause.entity.applications"&lt;BR /&gt;| lookup [fetch dt.entity.mobile_application], sourceField:affected_entity_ids, lookupField: id, prefix:"lookup.affected.entity.mobile"&lt;BR /&gt;| lookup [fetch dt.entity.mobile_application], sourceField:root_cause_entity_id, lookupField: id, prefix:"lookup.rootcause.entity.mobile"&lt;BR /&gt;| lookup [fetch dt.entity.custom_application], sourceField:affected_entity_ids, lookupField: id, prefix:"lookup.affected.entity.customapplication"&lt;BR /&gt;| lookup [fetch dt.entity.custom_application], sourceField:root_cause_entity_id, lookupField: id, prefix:"lookup.rootcause.entity.customapplication"&lt;BR /&gt;| lookup [fetch dt.entity.cloud_application], sourceField:affected_entity_ids, lookupField: id, prefix:"lookup.affected.entity.cloudapplication"&lt;BR /&gt;| lookup [fetch dt.entity.cloud_application], sourceField:root_cause_entity_id, lookupField: id, prefix:"lookup.rootcause.entity.cloudapplication"&lt;BR /&gt;| lookup [fetch dt.entity.synthetic_test], sourceField:affected_entity_ids, lookupField: id, prefix:"lookup.affected.entity.synthetictest"&lt;BR /&gt;| lookup [fetch dt.entity.synthetic_test], sourceField:root_cause_entity_id, lookupField: id, prefix:"lookup.rootcause.entity.synthetictest"&lt;BR /&gt;| lookup [fetch dt.entity.http_check], sourceField:affected_entity_ids, lookupField: id, prefix:"lookup.affected.entity.httpcheck"&lt;BR /&gt;| lookup [fetch dt.entity.http_check], sourceField:root_cause_entity_id, lookupField: id, prefix:"lookup.rootcause.entity.httpcheck"&lt;BR /&gt;| lookup [fetch dt.entity.kubernetes_cluster], sourceField:affected_entity_ids, lookupField: id, prefix:"lookup.affected.entity.kubernetescluster"&lt;BR /&gt;| lookup [fetch dt.entity.kubernetes_cluster], sourceField:root_cause_entity_id, lookupField: id, prefix:"lookup.rootcause.entity.kubernetescluster"&lt;BR /&gt;| lookup [fetch dt.entity.host], sourceField:affected_entity_ids, lookupField: id, prefix:"lookup.affected.entity.hosts"&lt;BR /&gt;| lookup [fetch dt.entity.host], sourceField:root_cause_entity_id, lookupField: id, prefix:"lookup.rootcause.entity.hosts"&lt;BR /&gt;| lookup [fetch dt.entity.custom_device], sourceField:affected_entity_ids, lookupField: id, prefix:"lookup.affected.entity.customdevices"&lt;BR /&gt;| lookup [fetch dt.entity.custom_device], sourceField:root_cause_entity_id, lookupField: id, prefix:"lookup.rootcause.entity.customdevices"&lt;BR /&gt;| lookup [fetch dt.entity.hypervisor], sourceField:affected_entity_ids, lookupField: id, prefix:"lookup.affected.entity.hypervisor"&lt;BR /&gt;| lookup [fetch dt.entity.hypervisor], sourceField:root_cause_entity_id, lookupField: id, prefix:"lookup.rootcause.entity.hypervisor"&lt;BR /&gt;| lookup [fetch dt.entity.environment], sourceField:affected_entity_ids, lookupField: id, prefix:"lookup.affected.entity.environment"&lt;BR /&gt;// Lookup for affected_entity_ids and root_cause_entity_id End&lt;/P&gt;&lt;P&gt;| fieldsAdd zone = coalesce(lookup.affected.entity.hostsmanagementZones, lookup.affected.entity.hypervisormanagementZones,lookup.affected.entity.servicesmanagementZones)&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;// | summarize {zone = takeFirst(zone),startTime = takeFirst(event.start),&lt;BR /&gt;| summarize {zone = takeFirst(zone),startTime = takeFirst(event.start),&lt;BR /&gt;endTime = takeFirst(event.end),&lt;BR /&gt;problemClosedDuration = takeFirst(resolved_problem_duration),&lt;BR /&gt;status = takeFirst(event.status),&lt;BR /&gt;event.name = takeFirst(event.name),&lt;BR /&gt;severityLevel = takeFirst(event.category),&lt;BR /&gt;affected = takeFirst(affected_entity_ids),&lt;BR /&gt;rootCause = takeFirst(root_cause_entity_id),&lt;BR /&gt;dt.davis.is_duplicate = takeFirst(dt.davis.is_duplicate),&lt;BR /&gt;affectedServices = collectDistinct(lookup.affected.entity.servicesentity.name),&lt;BR /&gt;affectedPGI = collectDistinct(lookup.affected.entity.pgientity.name),&lt;BR /&gt;affectedApplications = collectDistinct(lookup.affected.entity.applicationsentity.name),&lt;BR /&gt;affectedMobile = collectDistinct(lookup.affected.entity.mobileentity.name),&lt;BR /&gt;affectedCustomApplication = collectDistinct(lookup.affected.entity.customapplicationentity.name),&lt;BR /&gt;affectedCloudApplication = collectDistinct(lookup.affected.entity.cloudapplicationentity.name),&lt;BR /&gt;affectedSyntheticTest = collectDistinct(lookup.affected.entity.synthetictestentity.name),&lt;BR /&gt;affectedEntityZone = takeFirst(affected_entity.management_zones.names),&lt;BR /&gt;affectedHttpCheck = collectDistinct(lookup.affected.entity.httpcheckentity.name),&lt;BR /&gt;affectedKubernetesCluster = collectDistinct(lookup.affected.entity.kubernetesclusterentity.name),&lt;BR /&gt;affectedHosts = collectDistinct(lookup.affected.entity.hostsentity.name),&lt;BR /&gt;affectedCustomDevices = collectDistinct(lookup.affected.entity.customdevicesentity.name),&lt;BR /&gt;affectedHypervisor = collectDistinct(lookup.affected.entity.hypervisorentity.name),&lt;BR /&gt;affectedEnvironment = collectDistinct(lookup.affected.entity.environmententity.name),&lt;BR /&gt;rootCauseServices = collectDistinct(lookup.rootcause.entity.servicesentity.name),&lt;BR /&gt;rootCausePGI = collectDistinct(lookup.rootcause.entity.pgientity.name),&lt;BR /&gt;rootCauseApplications = collectDistinct(lookup.rootcause.entity.applicationsentity.name),&lt;BR /&gt;rootCauseMobile = collectDistinct(lookup.rootcause.entity.mobileentity.name),&lt;BR /&gt;rootCauseCustomApplication = collectDistinct(lookup.rootcause.entity.customapplicationentity.name),&lt;BR /&gt;rootCauseSyntheticTest = collectDistinct(lookup.rootcause.entity.synthetictestentity.name),&lt;BR /&gt;rootCauseHttpCheck = collectDistinct(lookup.rootcause.entity.httpcheckentity.name),&lt;BR /&gt;rootCauseHosts = collectDistinct(lookup.rootcause.entity.hostsentity.name),&lt;BR /&gt;rootCauseCustomDevices = collectDistinct(lookup.rootcause.entity.customdevicesentity.name),&lt;BR /&gt;event.id = takeFirst(event.id)},&lt;BR /&gt;by:{display_id}&lt;BR /&gt;| filter `dt.davis.is_duplicate` == false&lt;BR /&gt;| fieldsAdd currentTime = toTimestamp(now())&lt;BR /&gt;| fieldsAdd status = if((status == "ACTIVE"),"OPEN",&lt;BR /&gt;else:if((status == "CLOSED"), "CLOSED"))&lt;/P&gt;&lt;P&gt;| fields zone,Status = if((status == "OPEN")," OPEN",&lt;BR /&gt;else:if((status == "CLOSED"),"🟢 CLOSED")),&lt;BR /&gt;Problem = concat(display_id," - ",event.name),&lt;BR /&gt;Severity = severityLevel,&lt;BR /&gt;Type = (event.name),&lt;BR /&gt;AffectedCount = arraySize(arrayRemoveNulls(arrayConcat(affectedApplications,affectedMobile,affectedCustomApplication,affectedCloudApplication,affectedSyntheticTest,affectedHttpCheck,affectedServices,affectedPGI,affectedKubernetesCluster,affectedHosts,affectedHypervisor,affectedCustomDevices,affectedEnvironment))),&lt;BR /&gt;Affected = arrayRemoveNulls(arrayConcat(zone,affectedApplications,affectedMobile,affectedCustomApplication,affectedCloudApplication,affectedSyntheticTest,affectedHttpCheck,affectedServices,affectedPGI,affectedKubernetesCluster,affectedHosts,affectedHypervisor,affectedCustomDevices,affectedEnvironment)),&lt;BR /&gt;RootCause = arrayRemoveNulls(arrayConcat(rootCauseServices,rootCauseHosts)),&lt;BR /&gt;StartTime = startTime,&lt;BR /&gt;EndTime = if((status == "OPEN"),"In Progress",&lt;BR /&gt;else:if((status == "CLOSED"),endTime)),&lt;BR /&gt;`Duration (min)` = if((status == "CLOSED"),problemClosedDuration/60000000000,&lt;BR /&gt;else:if((status == "OPEN"), toLong(currentTime-startTime)/60000000000)),&lt;BR /&gt;event.id&lt;BR /&gt;| sort StartTime, direction:"descending"&lt;BR /&gt;| sort Status, direction:"ascending"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Where should I add the additional filter for my variable MZ?&amp;nbsp; Couldn't figured it out, thanks in advance&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 24 May 2024 08:02:06 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Dashboarding/Filter-by-Management-Zone-using-DQL/m-p/246455#M3985</guid>
      <dc:creator>andruccioli50</dc:creator>
      <dc:date>2024-05-24T08:02:06Z</dc:date>
    </item>
    <item>
      <title>Re: Filter by Management Zone using DQL</title>
      <link>https://community.dynatrace.com/t5/Dashboarding/Filter-by-Management-Zone-using-DQL/m-p/247035#M4002</link>
      <description>&lt;P&gt;Oops, how are you? I don't know if I understand the question, but have you tried using this instruction to filter with your variable?&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| filter in(zone ,array($MZ))&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 31 May 2024 12:27:13 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Dashboarding/Filter-by-Management-Zone-using-DQL/m-p/247035#M4002</guid>
      <dc:creator>RPbiaggio</dc:creator>
      <dc:date>2024-05-31T12:27:13Z</dc:date>
    </item>
    <item>
      <title>Re: Filter by Management Zone using DQL</title>
      <link>https://community.dynatrace.com/t5/Dashboarding/Filter-by-Management-Zone-using-DQL/m-p/249331#M4069</link>
      <description>&lt;P&gt;This repo is not working&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jun 2024 19:45:52 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Dashboarding/Filter-by-Management-Zone-using-DQL/m-p/249331#M4069</guid>
      <dc:creator>Mangordi89</dc:creator>
      <dc:date>2024-06-27T19:45:52Z</dc:date>
    </item>
    <item>
      <title>Re: Filter by Management Zone using DQL</title>
      <link>https://community.dynatrace.com/t5/Dashboarding/Filter-by-Management-Zone-using-DQL/m-p/256344#M4340</link>
      <description>&lt;P&gt;Can we filter by ManagementZone for davis problem?&amp;nbsp;&lt;/P&gt;&lt;P&gt;for example this query,&amp;nbsp;&lt;/P&gt;&lt;P&gt;fetch dt.davis.problems&lt;BR /&gt;| filter event.category == "ERROR"&lt;BR /&gt;| sort count desc&lt;/P&gt;&lt;P&gt;I want to filter the records based on MZ in new dashboard, is it possible?&lt;/P&gt;</description>
      <pubDate>Wed, 18 Sep 2024 18:39:47 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Dashboarding/Filter-by-Management-Zone-using-DQL/m-p/256344#M4340</guid>
      <dc:creator>Vrushali</dc:creator>
      <dc:date>2024-09-18T18:39:47Z</dc:date>
    </item>
    <item>
      <title>Re: Filter by Management Zone using DQL</title>
      <link>https://community.dynatrace.com/t5/Dashboarding/Filter-by-Management-Zone-using-DQL/m-p/269919#M4779</link>
      <description>&lt;P&gt;I have this same question.&amp;nbsp; Did you ever find a solution?&lt;/P&gt;</description>
      <pubDate>Wed, 12 Feb 2025 15:34:58 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Dashboarding/Filter-by-Management-Zone-using-DQL/m-p/269919#M4779</guid>
      <dc:creator>nathan_tennant</dc:creator>
      <dc:date>2025-02-12T15:34:58Z</dc:date>
    </item>
  </channel>
</rss>

