<?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: I want to know whether Bob had se in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/I-want-to-know-whether-Bob-had-se/m-p/240482#M71478</link>
    <description>&lt;PRE&gt;&lt;CODE&gt;index=tv 
| rename setai_no as name rt_code as ch
| eval viewstart=strptime(date."#".start_time, "%Y-%m-%d#%H%M") 
| eval viewend=strptime(date."#".end_time, "%Y-%m-%d#%H%M") 
| eval viewrange=mvrange(viewstart, viewend, "30m")  
| mvexpand viewrange
| fields name viewrange ch viewend
| append [search index=tv_program 
| rename BROADCAST_DATE as date START_TIME as starttime END_TIME  as endtime PROGRAM_NAME as prog STATION_CODE as ch
| eval viewstart=strptime(date."#".starttime, "%Y/%m/%d#%H%M") 
| eval viewend=strptime(date."#".endtime, "%Y/%m/%d#%H%M") 
| eval viewrange=mvrange(viewstart, viewend, "30m")  
| mvexpand viewrange 
| fields viewrange ch prog viewend ]
| stats values(prog) as program values(viewend) as viewend by name ch viewrange 
| dedup name viewend 
| rename viewrange as start viewend as end 
| eval date=strftime(start, "%Y/%m/%d") 
| eval start=strftime(start, "%H:%M") 
| eval end=strftime(end, "%H:%M") 
| table name date start end program
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This is.&lt;/P&gt;</description>
    <pubDate>Mon, 10 Oct 2016 21:01:53 GMT</pubDate>
    <dc:creator>kawashita_t</dc:creator>
    <dc:date>2016-10-10T21:01:53Z</dc:date>
    <item>
      <title>I want to know whether Bob had se</title>
      <link>https://community.splunk.com/t5/Splunk-Search/I-want-to-know-whether-Bob-had-se/m-p/240476#M71472</link>
      <description>&lt;P&gt;Please tell me the way of the binding of data.&lt;BR /&gt;
I want to combine the two data.&lt;/P&gt;

&lt;P&gt;These data How can you join?&lt;/P&gt;</description>
      <pubDate>Mon, 10 Oct 2016 05:42:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/I-want-to-know-whether-Bob-had-se/m-p/240476#M71472</guid>
      <dc:creator>kawashita_t</dc:creator>
      <dc:date>2016-10-10T05:42:06Z</dc:date>
    </item>
    <item>
      <title>Re: I want to know whether Bob had se</title>
      <link>https://community.splunk.com/t5/Splunk-Search/I-want-to-know-whether-Bob-had-se/m-p/240477#M71473</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;index=tv_viewing_log |join  channel date [search index=tv_program_data] |eval watched=if(startWatch&amp;gt;=startAir AND startWatch&amp;lt;=endAir,1,0)|search watched=1
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;where startWatch is 0800 is Time began to see, startAir is 0730 is Broadcast start time and endAir is 0900 is Broadcast end time in your example&lt;/P&gt;

&lt;P&gt;maybe something like this?&lt;/P&gt;</description>
      <pubDate>Mon, 10 Oct 2016 13:20:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/I-want-to-know-whether-Bob-had-se/m-p/240477#M71473</guid>
      <dc:creator>cmerriman</dc:creator>
      <dc:date>2016-10-10T13:20:38Z</dc:date>
    </item>
    <item>
      <title>Re: I want to know whether Bob had se</title>
      <link>https://community.splunk.com/t5/Splunk-Search/I-want-to-know-whether-Bob-had-se/m-p/240478#M71474</link>
      <description>&lt;P&gt;Assuming your data is already in splunk in two separate indexes, you could try something like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;base search to return all viewing data | eval viewstart=strptime(date."#".starttime, "%Y/%m/%d#%H%M") | eval viewend=strptime(date."#".endtime, "%Y/%m/%d#%H%M") | eval viewrange=mvrange(viewstart, viewend, "30m")  | mvexpand viewrange | fields name viewrange ch viewend | append [search base search to return all programming data | eval viewstart=strptime(date."#".starttime, "%Y/%m/%d#%H%M") | eval viewend=strptime(date."#".endtime, "%Y/%m/%d#%H%M") | eval viewrange=mvrange(viewstart, viewend, "30m")  | mvexpand viewrange | fields viewrange ch prog  viewend ] | stats values(prog) as program values(viewend) as viewend  values(name) as name by ch viewrange | dedup name viewend | rename viewrange as start viewend as end | eval date=strftime(start, "%Y/%m/%d") | eval start=strftime(start, "%H:%M") | eval end=strftime(end, "%H:%M") | table name date start end program
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;*&lt;STRONG&gt;&lt;EM&gt;OR&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index=tv 
 | rename setai_no as name rt_code as ch
 | eval viewstart=strptime(date."#".start_time, "%Y-%m-%d#%H%M") 
 | eval viewend=strptime(date."#".end_time, "%Y-%m-%d#%H%M") 
 | eval viewrange=mvrange(viewstart, viewend, "30m")  
 | mvexpand viewrange
 | fields name viewrange ch viewend
 | append [search index=tv_program 
 | rename BROADCAST_DATE as date START_TIME as starttime END_TIME  as endtime PROGRAM_NAME as prog STATION_CODE as ch
 | eval viewstart=strptime(date."#".starttime, "%Y/%m/%d#%H%M") 
 | eval viewend=strptime(date."#".endtime, "%Y/%m/%d#%H%M") 
 | eval viewrange=mvrange(viewstart, viewend, "30m")  
 | mvexpand viewrange 
 | fields viewrange ch prog viewend ]
 | stats values(prog) as program values(viewend) as viewend values(name) as name by ch viewrange 
 | dedup name viewend 
 | rename viewrange as start viewend as end 
 | eval date=strftime(start, "%Y/%m/%d") 
 | eval start=strftime(start, "%H:%M") 
 | eval end=strftime(end, "%H:%M") 
 | table name date start end program
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 10 Oct 2016 13:26:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/I-want-to-know-whether-Bob-had-se/m-p/240478#M71474</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2016-10-10T13:26:26Z</dc:date>
    </item>
    <item>
      <title>Re: I want to know whether Bob had se</title>
      <link>https://community.splunk.com/t5/Splunk-Search/I-want-to-know-whether-Bob-had-se/m-p/240479#M71475</link>
      <description>&lt;P&gt;Thank you for answering.&lt;BR /&gt;
I tried it but it did not work.&lt;/P&gt;

&lt;P&gt;Have been combined in time and channel, data corresponding to the part of 「eval watched = ~~ 」is not.&lt;BR /&gt;
Perhaps, because the date and channel is a plurality of the same data set.&lt;/P&gt;

&lt;P&gt;Example) &lt;BR /&gt;
1.TV viewing log&lt;BR /&gt;
Example ) Bob , 2016/10/10 , 0800 , 0830 , 6ch&lt;/P&gt;

&lt;P&gt;2.TV Prgram Data&lt;BR /&gt;
Example ) &lt;BR /&gt;
2016/10/10,0500,0600,6ch,24 1st  season ←←This data set is joined&lt;BR /&gt;
2016/10/10,0730,0900,6ch,24 2nd season&lt;BR /&gt;
2016/10/10,0930,1000,6ch,24 3rd season&lt;/P&gt;</description>
      <pubDate>Mon, 10 Oct 2016 13:55:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/I-want-to-know-whether-Bob-had-se/m-p/240479#M71475</guid>
      <dc:creator>kawashita_t</dc:creator>
      <dc:date>2016-10-10T13:55:49Z</dc:date>
    </item>
    <item>
      <title>Re: I want to know whether Bob had se</title>
      <link>https://community.splunk.com/t5/Splunk-Search/I-want-to-know-whether-Bob-had-se/m-p/240480#M71476</link>
      <description>&lt;P&gt;Thank you for answering.&lt;BR /&gt;
I tried, but it did not work.&lt;/P&gt;

&lt;P&gt;Until the 「append ~~」 was operating properly.&lt;BR /&gt;
I do not understand did not work the part.&lt;/P&gt;

&lt;P&gt;One by one to confirm.&lt;/P&gt;</description>
      <pubDate>Mon, 10 Oct 2016 14:40:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/I-want-to-know-whether-Bob-had-se/m-p/240480#M71476</guid>
      <dc:creator>kawashita_t</dc:creator>
      <dc:date>2016-10-10T14:40:46Z</dc:date>
    </item>
    <item>
      <title>Re: I want to know whether Bob had se</title>
      <link>https://community.splunk.com/t5/Splunk-Search/I-want-to-know-whether-Bob-had-se/m-p/240481#M71477</link>
      <description>&lt;P&gt;Please share your query&lt;/P&gt;</description>
      <pubDate>Mon, 10 Oct 2016 14:52:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/I-want-to-know-whether-Bob-had-se/m-p/240481#M71477</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2016-10-10T14:52:19Z</dc:date>
    </item>
    <item>
      <title>Re: I want to know whether Bob had se</title>
      <link>https://community.splunk.com/t5/Splunk-Search/I-want-to-know-whether-Bob-had-se/m-p/240482#M71478</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;index=tv 
| rename setai_no as name rt_code as ch
| eval viewstart=strptime(date."#".start_time, "%Y-%m-%d#%H%M") 
| eval viewend=strptime(date."#".end_time, "%Y-%m-%d#%H%M") 
| eval viewrange=mvrange(viewstart, viewend, "30m")  
| mvexpand viewrange
| fields name viewrange ch viewend
| append [search index=tv_program 
| rename BROADCAST_DATE as date START_TIME as starttime END_TIME  as endtime PROGRAM_NAME as prog STATION_CODE as ch
| eval viewstart=strptime(date."#".starttime, "%Y/%m/%d#%H%M") 
| eval viewend=strptime(date."#".endtime, "%Y/%m/%d#%H%M") 
| eval viewrange=mvrange(viewstart, viewend, "30m")  
| mvexpand viewrange 
| fields viewrange ch prog viewend ]
| stats values(prog) as program values(viewend) as viewend by name ch viewrange 
| dedup name viewend 
| rename viewrange as start viewend as end 
| eval date=strftime(start, "%Y/%m/%d") 
| eval start=strftime(start, "%H:%M") 
| eval end=strftime(end, "%H:%M") 
| table name date start end program
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This is.&lt;/P&gt;</description>
      <pubDate>Mon, 10 Oct 2016 21:01:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/I-want-to-know-whether-Bob-had-se/m-p/240482#M71478</guid>
      <dc:creator>kawashita_t</dc:creator>
      <dc:date>2016-10-10T21:01:53Z</dc:date>
    </item>
    <item>
      <title>Re: I want to know whether Bob had se</title>
      <link>https://community.splunk.com/t5/Splunk-Search/I-want-to-know-whether-Bob-had-se/m-p/240483#M71479</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;| stats values(prog) as program values(viewend) as viewend by name ch viewrange
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This search content did not have the results.&lt;BR /&gt;
「Viewrange」 it might cause.&lt;/P&gt;</description>
      <pubDate>Mon, 10 Oct 2016 21:23:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/I-want-to-know-whether-Bob-had-se/m-p/240483#M71479</guid>
      <dc:creator>kawashita_t</dc:creator>
      <dc:date>2016-10-10T21:23:55Z</dc:date>
    </item>
    <item>
      <title>Re: I want to know whether Bob had se</title>
      <link>https://community.splunk.com/t5/Splunk-Search/I-want-to-know-whether-Bob-had-se/m-p/240484#M71480</link>
      <description>&lt;P&gt;Try the updated query&lt;/P&gt;</description>
      <pubDate>Mon, 10 Oct 2016 21:52:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/I-want-to-know-whether-Bob-had-se/m-p/240484#M71480</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2016-10-10T21:52:06Z</dc:date>
    </item>
    <item>
      <title>Re: I want to know whether Bob had se</title>
      <link>https://community.splunk.com/t5/Splunk-Search/I-want-to-know-whether-Bob-had-se/m-p/240485#M71481</link>
      <description>&lt;P&gt;Thank you.&lt;BR /&gt;
i will try&lt;/P&gt;</description>
      <pubDate>Mon, 10 Oct 2016 21:57:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/I-want-to-know-whether-Bob-had-se/m-p/240485#M71481</guid>
      <dc:creator>kawashita_t</dc:creator>
      <dc:date>2016-10-10T21:57:16Z</dc:date>
    </item>
    <item>
      <title>Re: I want to know whether Bob had se</title>
      <link>https://community.splunk.com/t5/Splunk-Search/I-want-to-know-whether-Bob-had-se/m-p/240486#M71482</link>
      <description>&lt;P&gt;Results come out but, "program" is not output.&lt;/P&gt;

&lt;P&gt;Output Example:&lt;BR /&gt;
&lt;CODE&gt;Bob , 2016/10/10 , 0830 , 0930 ,&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Oct 2016 22:04:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/I-want-to-know-whether-Bob-had-se/m-p/240486#M71482</guid>
      <dc:creator>kawashita_t</dc:creator>
      <dc:date>2016-10-10T22:04:14Z</dc:date>
    </item>
  </channel>
</rss>

