<?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 chart the results of two joined searches? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-chart-the-results-of-two-joined-searches/m-p/204247#M59348</link>
    <description>&lt;P&gt;Saw your reply. There are some logging issues with my data and I'm re-evaluating what I'm using to gauge "success" of any query at this point.&lt;/P&gt;

&lt;P&gt;If I'm reading your query right, though, this would get me all changes as well as initial values - then essentially dedup when you combine them in a chart?&lt;/P&gt;

&lt;P&gt;Not sure I have that right.&lt;/P&gt;</description>
    <pubDate>Fri, 10 Jun 2016 20:04:30 GMT</pubDate>
    <dc:creator>jdhux</dc:creator>
    <dc:date>2016-06-10T20:04:30Z</dc:date>
    <item>
      <title>How to chart the results of two joined searches?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-chart-the-results-of-two-joined-searches/m-p/204245#M59346</link>
      <description>&lt;P&gt;I have two types of log events:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;FIELD INITIAL VALUE
Message: 
{
        "FieldName":"Field_A",
        "OrganizationID":1234,
        "FooDocumentId":01,
        "WasAutoPopulated":true,
        "FooAutopopulateInitialValueId":567,
}

FIELD UPDATE
Message: 
{
        "FieldName":"Field_A",
        "OrganizationID":1234,
        "FooDocumentId":01,
        "FooValueChangeId":890,
} 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;that I am trying to chart out using two joined searches.&lt;BR /&gt;
FooDocumentId is a primary key, FieldName can have 1 of 10 values.&lt;/P&gt;

&lt;P&gt;I want to count the number of times when a field had an initial value event AND an update event.&lt;/P&gt;

&lt;P&gt;I have two separate queries to get these counts (that I think work):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;FIND INITIAL FIELD VALUE EVENTS
    WasAutoPopulated=true 
    | chart dc(FooAutopopulateInitialValueId) by OrganizationID, FieldName

FIND FIELD UPDATES
    FooValueChangeId 
    | dedup FooValueChangeID 
    | chart COUNT(eval(FooValueChangeID)) by OrganizationID, FieldName
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But I've been struggling to get the join right. I've done:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;FooValueChangeId 
| dedup FooValueChangeID 
| join type=left FooDocumentId, FooFieldName, FooOrgID
  [search FooAutopopulateInitialValueId WasAutoPopulated=true]
| chart COUNT(eval(FieldName)) by OrganizationID, FieldName
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;but the DocumentIds for update events don't line up with the DocumentIds for initial value events&lt;/P&gt;

&lt;P&gt;I'm looking for output like:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;OrganizationID  Field_A Field_B Field_C
1234            2       1       0
0978            4       3       1
etc...
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;where the numbers under each fieldname are the counts of when that field for that organization had both an initial field value event and a field update event.&lt;/P&gt;

&lt;P&gt;Am I miles off base?&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 08 Jun 2016 19:19:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-chart-the-results-of-two-joined-searches/m-p/204245#M59346</guid>
      <dc:creator>jdhux</dc:creator>
      <dc:date>2016-06-08T19:19:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to chart the results of two joined searches?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-chart-the-results-of-two-joined-searches/m-p/204246#M59347</link>
      <description>&lt;P&gt;How about this;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; FooValueChangeId OR ( FooAutopopulateInitialValueId WasAutoPopulated=true )
 | chart count over OrganizationID by FieldName
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 08 Jun 2016 22:38:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-chart-the-results-of-two-joined-searches/m-p/204246#M59347</guid>
      <dc:creator>Masa</dc:creator>
      <dc:date>2016-06-08T22:38:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to chart the results of two joined searches?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-chart-the-results-of-two-joined-searches/m-p/204247#M59348</link>
      <description>&lt;P&gt;Saw your reply. There are some logging issues with my data and I'm re-evaluating what I'm using to gauge "success" of any query at this point.&lt;/P&gt;

&lt;P&gt;If I'm reading your query right, though, this would get me all changes as well as initial values - then essentially dedup when you combine them in a chart?&lt;/P&gt;

&lt;P&gt;Not sure I have that right.&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jun 2016 20:04:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-chart-the-results-of-two-joined-searches/m-p/204247#M59348</guid>
      <dc:creator>jdhux</dc:creator>
      <dc:date>2016-06-10T20:04:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to chart the results of two joined searches?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-chart-the-results-of-two-joined-searches/m-p/204248#M59349</link>
      <description>&lt;P&gt;Yes, you're correct. &lt;/P&gt;

&lt;P&gt;The chart will do;&lt;BR /&gt;
For Each OrganizationID, count of events per FieldsName.  &lt;/P&gt;</description>
      <pubDate>Fri, 10 Jun 2016 23:00:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-chart-the-results-of-two-joined-searches/m-p/204248#M59349</guid>
      <dc:creator>Masa</dc:creator>
      <dc:date>2016-06-10T23:00:18Z</dc:date>
    </item>
  </channel>
</rss>

