<?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 Show results only with matching fields from two different queries in Cortex XDR Discussions</title>
    <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/show-results-only-with-matching-fields-from-two-different/m-p/565026#M5524</link>
    <description>&lt;P&gt;I am trying to combine the results from two queries, one using dataset=xdr_data and one from preset=xdr_file. But, I only want to see the results when the same "agent_hostname" appears in both queries. In other words IF agent_hostname from filtered xdr_data = agent_hostname from filtered preset, show me all the results with those agent_hostnames from each query.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;How would I go about staging this?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Thu, 09 Nov 2023 18:13:26 GMT</pubDate>
    <dc:creator>balazshajdu</dc:creator>
    <dc:date>2023-11-09T18:13:26Z</dc:date>
    <item>
      <title>Show results only with matching fields from two different queries</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/show-results-only-with-matching-fields-from-two-different/m-p/565026#M5524</link>
      <description>&lt;P&gt;I am trying to combine the results from two queries, one using dataset=xdr_data and one from preset=xdr_file. But, I only want to see the results when the same "agent_hostname" appears in both queries. In other words IF agent_hostname from filtered xdr_data = agent_hostname from filtered preset, show me all the results with those agent_hostnames from each query.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;How would I go about staging this?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 09 Nov 2023 18:13:26 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/show-results-only-with-matching-fields-from-two-different/m-p/565026#M5524</guid>
      <dc:creator>balazshajdu</dc:creator>
      <dc:date>2023-11-09T18:13:26Z</dc:date>
    </item>
    <item>
      <title>Re: Show results only with matching fields from two different queries</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/show-results-only-with-matching-fields-from-two-different/m-p/565030#M5525</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/271778"&gt;@balazshajdu&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;You can use the Join stage to do so. The join() stage combines the results of two queries into a single result set.&amp;nbsp; The default type is inner,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;inner: Returns all the records in common between the queries that are being joined. This is the default join type.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;However, not sure if your example is just for demo or it is your actual use case, the reason is that agent_hostname filed is the same in both sources you have in reference, this is because&amp;nbsp;preset = xdr_file is part of the bigger dataset&amp;nbsp;dataset = xdr_data , so i recommend doing the matching on fields other than the hostname, but nonetheless, whatever field you choose you can use the syntax below and changes it accordingly to fit your use case&lt;BR /&gt;&lt;BR /&gt;dataset = xdr_data&lt;BR /&gt;// here add your filters/ stages, the next step is to do the Join as below&lt;BR /&gt;&lt;BR /&gt;| join type = inner ( preset = xdr_file ) as presetjoin presetjoin.agent_hostname = agent_hostname &lt;BR /&gt;| fields agent_hostname , * // here define the fields you want to show in your result table&lt;BR /&gt;&lt;BR /&gt;Hope that helps and shed some light, please let me know if any and if that answers your question, feel free to mark this as accepted solution so others can benefit from.&lt;BR /&gt;&lt;BR /&gt;Best,&lt;BR /&gt;Zee&lt;/P&gt;</description>
      <pubDate>Thu, 09 Nov 2023 19:30:07 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/show-results-only-with-matching-fields-from-two-different/m-p/565030#M5525</guid>
      <dc:creator>zarnous</dc:creator>
      <dc:date>2023-11-09T19:30:07Z</dc:date>
    </item>
    <item>
      <title>Re: Show results only with matching fields from two different queries</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/show-results-only-with-matching-fields-from-two-different/m-p/1220212#M7875</link>
      <description>&lt;P&gt;how do you show what IS NOT in common? I cant figure this part out&lt;/P&gt;</description>
      <pubDate>Wed, 12 Feb 2025 19:18:26 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/show-results-only-with-matching-fields-from-two-different/m-p/1220212#M7875</guid>
      <dc:creator>D.Demarest</dc:creator>
      <dc:date>2025-02-12T19:18:26Z</dc:date>
    </item>
  </channel>
</rss>

