<?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: How to join changes queries data output? in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-join-changes-queries-data-output/m-p/624414#M51197</link>
    <description>&lt;P&gt;| stats&lt;BR /&gt;count(eval(status="pass")) AS passed&lt;BR /&gt;count(eval(status="failed" )) AS failed&lt;BR /&gt;BY name&lt;/P&gt;</description>
    <pubDate>Thu, 15 Dec 2022 17:40:10 GMT</pubDate>
    <dc:creator>Dzmitry</dc:creator>
    <dc:date>2022-12-15T17:40:10Z</dc:date>
    <item>
      <title>How to join changes queries data output?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-join-changes-queries-data-output/m-p/624232#M51175</link>
      <description>&lt;P&gt;Hello&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I found a strange behavior of the join command.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Here are two queries:&lt;BR /&gt;&lt;BR /&gt;1) search status=pass | chart dc(id) as pass by name&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;2)&amp;nbsp;&lt;SPAN&gt;search status=failed | chart dc(id) as failed by name&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;then I try to join these queries to get one table:&lt;/P&gt;
&lt;P&gt;3) search status=pass | chart dc(id) as pass by name | table name pass&lt;BR /&gt;| join name [ search status=&lt;SPAN&gt;failed &lt;/SPAN&gt;| chart dc(id) as failed by name | table name failed ]&lt;BR /&gt;| table name pass failed&lt;/P&gt;
&lt;P&gt;For some reason "&lt;SPAN&gt;failed" column&amp;nbsp;values by&amp;nbsp;&lt;/SPAN&gt;the query #2 are different to values from join in the query #3, but "&lt;SPAN&gt;pass" column&amp;nbsp;values&lt;/SPAN&gt;are the same:&lt;/P&gt;
&lt;TABLE border="1" width="100%"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="25%" height="25px"&gt;query 1 table&lt;/TD&gt;
&lt;TD width="25%" height="25px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="25%" height="25px"&gt;query 2 table&lt;/TD&gt;
&lt;TD width="25%" height="25px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="25%" height="25px"&gt;name&lt;/TD&gt;
&lt;TD width="25%" height="25px"&gt;pass&lt;/TD&gt;
&lt;TD width="25%" height="25px"&gt;name&amp;nbsp;&lt;/TD&gt;
&lt;TD width="25%" height="25px"&gt;&lt;STRONG&gt;failed&lt;/STRONG&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="25%" height="25px"&gt;Tom&amp;nbsp;&lt;/TD&gt;
&lt;TD width="25%" height="25px"&gt;12&lt;/TD&gt;
&lt;TD width="25%" height="25px"&gt;Tom&amp;nbsp;&lt;/TD&gt;
&lt;TD width="25%" height="25px"&gt;&lt;STRONG&gt;4&lt;/STRONG&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="25%" height="25px"&gt;Jerry&lt;/TD&gt;
&lt;TD width="25%" height="25px"&gt;13&lt;/TD&gt;
&lt;TD width="25%" height="25px"&gt;Jerry&lt;/TD&gt;
&lt;TD width="25%" height="25px"&gt;&lt;STRONG&gt;5&lt;/STRONG&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE border="1" width="100%"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="33.333333333333336%" height="25px"&gt;query 3 table&lt;/TD&gt;
&lt;TD width="33.333333333333336%" height="25px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="33.333333333333336%" height="25px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="33.333333333333336%" height="25px"&gt;name&lt;/TD&gt;
&lt;TD width="33.333333333333336%" height="25px"&gt;pass&lt;/TD&gt;
&lt;TD width="33.333333333333336%" height="25px"&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;failed&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="33.333333333333336%" height="25px"&gt;Tom&lt;/TD&gt;
&lt;TD width="33.333333333333336%" height="25px"&gt;12&lt;/TD&gt;
&lt;TD width="33.333333333333336%" height="25px"&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;7&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="33.333333333333336%" height="25px"&gt;Jerry&lt;/TD&gt;
&lt;TD width="33.333333333333336%" height="25px"&gt;13&lt;/TD&gt;
&lt;TD width="33.333333333333336%" height="25px"&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;9&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;</description>
      <pubDate>Wed, 14 Dec 2022 15:15:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-join-changes-queries-data-output/m-p/624232#M51175</guid>
      <dc:creator>Dzmitry</dc:creator>
      <dc:date>2022-12-14T15:15:31Z</dc:date>
    </item>
    <item>
      <title>Re: join changes queries data output</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-join-changes-queries-data-output/m-p/624240#M51177</link>
      <description>&lt;P&gt;There doesn't appear to be anything wrong with the queries so perhaps it is something about your data or the actual queries rather than the example ones.&lt;/P&gt;&lt;P&gt;Please can you provide some real, but anonymised, data or indeed fabricated data, demonstrating the issue?&lt;/P&gt;</description>
      <pubDate>Wed, 14 Dec 2022 14:26:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-join-changes-queries-data-output/m-p/624240#M51177</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2022-12-14T14:26:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to join changes queries data output?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-join-changes-queries-data-output/m-p/624252#M51178</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/252160"&gt;@Dzmitry&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;probably you have more than 50,000 results in the subsearch.&lt;/P&gt;&lt;P&gt;Anyway, use join only if you haven't any other solution, so explore something like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=your_index (status="pass" OR status="failed")
| stats 
   dc(eval(if(status="pass",id,""))) AS pass 
   dc(eval(if(status="failed",id,""))) AS failed 
   BY name&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Wed, 14 Dec 2022 15:57:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-join-changes-queries-data-output/m-p/624252#M51178</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-12-14T15:57:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to join changes queries data output?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-join-changes-queries-data-output/m-p/624404#M51195</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;SPAN&gt;Giuseppe&lt;/SPAN&gt;&lt;BR /&gt;Thank you for the help&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;May I ask one more question?&lt;BR /&gt;In case when I have to use count command&lt;BR /&gt;1) search status='passed' | &lt;STRONG&gt;stats count&lt;/STRONG&gt;(status) as pass by name&lt;BR /&gt;&lt;SPAN&gt;2) search status='failed' | &lt;STRONG&gt;stats count&lt;/STRONG&gt;(status) as failed by name&lt;BR /&gt;then I try to combine them:&lt;BR /&gt;3)&amp;nbsp;&lt;BR /&gt;&lt;/SPAN&gt;| stats&lt;BR /&gt;count(eval(if(status="pass", status, 0))) AS passed&lt;BR /&gt;count(eval(if(status="failed" , status, 0))) AS &lt;SPAN&gt;failed&lt;/SPAN&gt;&lt;BR /&gt;BY name&lt;BR /&gt;| table name passed &lt;SPAN&gt;failed&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;Columns have same values&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;TABLE border="1" width="56.25%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="25%"&gt;query 3 table&lt;/TD&gt;&lt;TD width="25%"&gt;pass&lt;/TD&gt;&lt;TD width="25%"&gt;failed&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="25%"&gt;Tom&lt;/TD&gt;&lt;TD width="25%"&gt;&lt;STRONG&gt;16&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="25%"&gt;&lt;STRONG&gt;16&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="25%"&gt;Jerry&lt;/TD&gt;&lt;TD width="25%"&gt;&lt;STRONG&gt;18&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="25%"&gt;&lt;STRONG&gt;18&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Dec 2022 16:20:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-join-changes-queries-data-output/m-p/624404#M51195</guid>
      <dc:creator>Dzmitry</dc:creator>
      <dc:date>2022-12-15T16:20:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to join changes queries data output?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-join-changes-queries-data-output/m-p/624414#M51197</link>
      <description>&lt;P&gt;| stats&lt;BR /&gt;count(eval(status="pass")) AS passed&lt;BR /&gt;count(eval(status="failed" )) AS failed&lt;BR /&gt;BY name&lt;/P&gt;</description>
      <pubDate>Thu, 15 Dec 2022 17:40:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-join-changes-queries-data-output/m-p/624414#M51197</guid>
      <dc:creator>Dzmitry</dc:creator>
      <dc:date>2022-12-15T17:40:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to join changes queries data output?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-join-changes-queries-data-output/m-p/624512#M51203</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/252160"&gt;@Dzmitry&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;yes, in the stats command you can put more functions, also both dc and count and you can use eval in each of them.&lt;/P&gt;&lt;P&gt;Ciao,&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Fri, 16 Dec 2022 07:32:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-join-changes-queries-data-output/m-p/624512#M51203</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-12-16T07:32:39Z</dc:date>
    </item>
  </channel>
</rss>

