<?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: Help recreating report from different souce in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Help-recreating-report-from-different-souce/m-p/267102#M80365</link>
    <description>&lt;P&gt;Check my answer in your other post&lt;BR /&gt;
&lt;A href="https://answers.splunk.com/answers/494439/appendcols-missing-data-in-column.html#answer-494537"&gt;https://answers.splunk.com/answers/494439/appendcols-missing-data-in-column.html#answer-494537&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 01 Feb 2017 16:55:15 GMT</pubDate>
    <dc:creator>somesoni2</dc:creator>
    <dc:date>2017-02-01T16:55:15Z</dc:date>
    <item>
      <title>Help recreating report from different souce</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-recreating-report-from-different-souce/m-p/267100#M80363</link>
      <description>&lt;P&gt;query:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=cat sourcetype=ctap host=sc58lcatp* source="*.out" "INFO: ZIP_SEARCH" OR "INFO: COMPARE" OR "INFO: COMPETITIVE_INFO" cat_userid="*" | stats count(cat_click) by cat_userid cat_role cat_click| sort cat_userid
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Output&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;cat_userid↕ cat_role↕   cat_click↕ count(cat_click)↕    
LPHILSON  STORESALES  ZIP_SEARCH  1  
LPRIMER  CARESALES  ZIP_SEARCH  13  
LRBROWN  STORESALES  ZIP_SEARCH  3  
LRIVES  STORESALES  ZIP_SEARCH  3  
LROSENE  SUPERUSER  COMPARE  1  
LROSENE  SUPERUSER  COMPETITIVE_INFO  1  
LROSENE  SUPERUSER  ZIP_SEARCH  1  
LSCALES  SUPERUSER  ZIP_SEARCH  15  
LSTEWART  CARESALES  COMPARE  
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I'm trying to get the data above into the format below.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;UserID  SalesChannel    Uses    Compare GetGlossary
ltapia  Careretention   69  2   2
mmslagle    Careretention   68  2   23
mpsutter    Careretention   64  5   0
tdewey  Careretention   46  23  0
akcarpenter Careretention   42  10  0
sklompstra  Careretention   42  6   0
khaselhuhn  Careretention   37  2   10
aneuens Careretention   36  5   0
jchaput Careretention   32  0   0
mmarshall3  Careretention   31  20  2
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 01 Feb 2017 16:23:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-recreating-report-from-different-souce/m-p/267100#M80363</guid>
      <dc:creator>kmccowen</dc:creator>
      <dc:date>2017-02-01T16:23:43Z</dc:date>
    </item>
    <item>
      <title>Re: Help recreating report from different souce</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-recreating-report-from-different-souce/m-p/267101#M80364</link>
      <description>&lt;P&gt;What is the relationship between columns of current output and expected output? Can't make any as the sample values also doesn't match.&lt;/P&gt;</description>
      <pubDate>Wed, 01 Feb 2017 16:36:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-recreating-report-from-different-souce/m-p/267101#M80364</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-02-01T16:36:10Z</dc:date>
    </item>
    <item>
      <title>Re: Help recreating report from different souce</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-recreating-report-from-different-souce/m-p/267102#M80365</link>
      <description>&lt;P&gt;Check my answer in your other post&lt;BR /&gt;
&lt;A href="https://answers.splunk.com/answers/494439/appendcols-missing-data-in-column.html#answer-494537"&gt;https://answers.splunk.com/answers/494439/appendcols-missing-data-in-column.html#answer-494537&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Feb 2017 16:55:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-recreating-report-from-different-souce/m-p/267102#M80365</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-02-01T16:55:15Z</dc:date>
    </item>
    <item>
      <title>Re: Help recreating report from different souce</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-recreating-report-from-different-souce/m-p/267103#M80366</link>
      <description>&lt;P&gt;Something like this - &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=cat sourcetype=ctap host=sc58lcatp* source="*.out"  cat_userid="*" 
(cat_click="ZIP_SEARCH" OR cat_click="COMPARE" OR cat_click="COMPETITIVE_INFO")
| stats count as clickCount by cat_userid cat_role cat_click
| eval SalesChannel=case(cat_role=="CARESALES","Careretention",
    cat_role=="STORESALES","StoreChannel",
    cat_role=="SUPERUSER","SuperChannel",
    true(),"DefaultChannel")    
| eval Uses=if(cat_click=="ZIP_SEARCH",clickCount,0)
| eval Compare=if(cat_click=="COMPARE",clickCount,0)
| eval GetGlossary=if(cat_click=="COMPETITIVE_INFO",clickCount,0)
| stats Sum(Uses) as Uses, sum(Compare) as Compare, sum(GetGlossary) as GetGlossary by cat_userid, SalesChannel
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I've assumed, since your code was already getting cat_click somewhere, that it was already defined to splunk, so it could be used in the search.  &lt;/P&gt;

&lt;P&gt;You'll need to modify the SalesChannel case statement to your actual channel names, assuming that's how you get the channel.&lt;/P&gt;</description>
      <pubDate>Wed, 01 Feb 2017 17:10:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-recreating-report-from-different-souce/m-p/267103#M80366</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2017-02-01T17:10:17Z</dc:date>
    </item>
  </channel>
</rss>

