<?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 How to create a market basket analysis? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-market-basket-analysis/m-p/146256#M185206</link>
    <description>&lt;P&gt;HI guys,&lt;/P&gt;

&lt;P&gt;Been trying to create a market basket analysis using splunk. Simply, I would like to build a pivot that would show me what other items were bought when Product A was purchased.&lt;/P&gt;

&lt;P&gt;I have a CSV with two columns, Transaction IDs and Products names. If a transaction had more than 1 item purchased the id will be listed with as many unique items as possible.&lt;/P&gt;

&lt;P&gt;Example &lt;/P&gt;

&lt;P&gt;ID-32  Product A&lt;BR /&gt;
ID 32  Product B&lt;BR /&gt;
ID 33  Product G&lt;BR /&gt;
ID 33  Product B&lt;BR /&gt;
ID 34  Product A&lt;BR /&gt;
ID 34  Product J&lt;/P&gt;

&lt;P&gt;etc.&lt;/P&gt;

&lt;P&gt;I am sure Splunk can do it. I just can't wrap my brain around it right now.&lt;/P&gt;

&lt;P&gt;Thank you.&lt;/P&gt;</description>
    <pubDate>Sat, 06 Dec 2014 00:29:25 GMT</pubDate>
    <dc:creator>tylampella</dc:creator>
    <dc:date>2014-12-06T00:29:25Z</dc:date>
    <item>
      <title>How to create a market basket analysis?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-market-basket-analysis/m-p/146256#M185206</link>
      <description>&lt;P&gt;HI guys,&lt;/P&gt;

&lt;P&gt;Been trying to create a market basket analysis using splunk. Simply, I would like to build a pivot that would show me what other items were bought when Product A was purchased.&lt;/P&gt;

&lt;P&gt;I have a CSV with two columns, Transaction IDs and Products names. If a transaction had more than 1 item purchased the id will be listed with as many unique items as possible.&lt;/P&gt;

&lt;P&gt;Example &lt;/P&gt;

&lt;P&gt;ID-32  Product A&lt;BR /&gt;
ID 32  Product B&lt;BR /&gt;
ID 33  Product G&lt;BR /&gt;
ID 33  Product B&lt;BR /&gt;
ID 34  Product A&lt;BR /&gt;
ID 34  Product J&lt;/P&gt;

&lt;P&gt;etc.&lt;/P&gt;

&lt;P&gt;I am sure Splunk can do it. I just can't wrap my brain around it right now.&lt;/P&gt;

&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Sat, 06 Dec 2014 00:29:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-market-basket-analysis/m-p/146256#M185206</guid>
      <dc:creator>tylampella</dc:creator>
      <dc:date>2014-12-06T00:29:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a market basket analysis?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-market-basket-analysis/m-p/146257#M185207</link>
      <description>&lt;P&gt;You could do something like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| search_or_inputlookup_to_get_csv
| stats values(Products) as ProductList by TransactionID
| where isnotnull(mvfind(ProductList,"Product A"))
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 06 Dec 2014 00:54:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-market-basket-analysis/m-p/146257#M185207</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2014-12-06T00:54:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a market basket analysis?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-market-basket-analysis/m-p/146258#M185208</link>
      <description>&lt;P&gt;this search string doing the work for the following data&lt;BR /&gt;
sample data:&lt;BR /&gt;
    partner cost&lt;BR /&gt;
    World T Plus    19000&lt;BR /&gt;
    Prix Mono   47500&lt;BR /&gt;
    Prix Mono   19000&lt;BR /&gt;
    Prix Mono   19000&lt;BR /&gt;
    World T Plus    19000&lt;BR /&gt;
    Prix Mono   19000&lt;BR /&gt;
    Prix Mono   38000&lt;BR /&gt;
    Prix Mono   19000&lt;/P&gt;

&lt;P&gt;search string:&lt;BR /&gt;
   source="C:\tachiFlashDisc\test_firstAnswers.csv" |sort partner|table partner cost | dedup cost&lt;BR /&gt;
    result:&lt;BR /&gt;
    partner cost&lt;BR /&gt;
    Africa Telecom  9500&lt;BR /&gt;
    Africa Telecom  19000&lt;BR /&gt;
    Africa Telecom  47500&lt;BR /&gt;
    Africa Telecom  28500&lt;BR /&gt;
    B and C 0&lt;BR /&gt;
    B and C 4750&lt;BR /&gt;
    B and C 33250&lt;BR /&gt;
    B and C 14250&lt;/P&gt;</description>
      <pubDate>Fri, 12 Dec 2014 12:10:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-market-basket-analysis/m-p/146258#M185208</guid>
      <dc:creator>tachifelix</dc:creator>
      <dc:date>2014-12-12T12:10:21Z</dc:date>
    </item>
  </channel>
</rss>

