<?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: Counting the number of sessions with more than one intent in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-count-the-number-of-sessions-with-more-than-one-intent/m-p/600535#M209054</link>
    <description>&lt;P&gt;I listed 2 sample events below. This is query for a chatbot platform. A conversation between a user and the bot is referred to as a session. A user can hit multiple intents in a session.&lt;/P&gt;&lt;P&gt;I'm trying to group sessions with 0 or 1 intents, and sessions with 2 or more intents.&amp;nbsp;&lt;/P&gt;&lt;P&gt;My original query was just a poor attempt to get to this data.&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;2022-06-03T19:25:53,135+0000 [INFO ] level=INFO  [RxCachedThreadScheduler-10]-[sessionId=0d326922-5526-4ca9-bdf8-c74b9bf665c8 test=false botId=ccb offl_TKT=false proto=V2 platform=WEB input_type=TEXT sku= pn= cid=3fd323ae-5958-4538-8e92-15567ad6d39e convo=]-[FulfillmentServiceImpl]-[381 ] Processing intent: intent=payroll.help_preferences_standard conversation=payroll.help_preferences_standard 
index = conversationintent = payroll.help_preferences_standardlinecount = 1punct = --::,+_[_]_=__[-]-[=----_=_=----_=_=----_=----_=_=sessionId = 0d326922-5526-4ca9-bdf8-c74b9bf665c8splunk_server
6/3/22
12:25:53.133 PM	

2022-06-03T19:25:53,133+0000 [INFO ] level=INFO  [RxCachedThreadScheduler-10]-[sessionId=0d326922-5526-4ca9-bdf8-c74b9bf665c8 test=false botId=ccb offl_TKT=false proto=V2 platform=WEB input_type=TEXT convo=]-[AnalyticsServiceImpl]-[129 ] cuidata=true type=user intent=payroll.update_account confidence=1.0 feedback=false handled=true message="Configurer la paie"; 
index = conversationintent = payroll.update_account = 1punct = --::,+_[_]_=__[-]-[=----_=_=----_=_=----_=----_=_=sessionId = 0d326922-5526-4ca9-bdf8-c74b9bf665c8&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 03 Jun 2022 19:35:04 GMT</pubDate>
    <dc:creator>KyleMcDougall</dc:creator>
    <dc:date>2022-06-03T19:35:04Z</dc:date>
    <item>
      <title>How to count the number of sessions with more than one intent?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-count-the-number-of-sessions-with-more-than-one-intent/m-p/600517#M209047</link>
      <description>&lt;P&gt;I'm trying to count the number of sessions (known as sessionId) that have more than 2 intents. (An intent is a field value). And also include the total number of sessions, including sessions with 0 or 1 intents.&lt;/P&gt;
&lt;P&gt;I can't figure out the concept for this query.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;index=conversation botId=ccb
| eval intent_total=if(intent=*, 1, 0)
| stats sum(intent_total) by sessionId
| where intent_total &amp;gt; 2
| table sessionId intent_count&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jun 2022 21:00:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-count-the-number-of-sessions-with-more-than-one-intent/m-p/600517#M209047</guid>
      <dc:creator>KyleMcDougall</dc:creator>
      <dc:date>2022-06-06T21:00:54Z</dc:date>
    </item>
    <item>
      <title>Re: Counting the number of sessions with more than one intent</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-count-the-number-of-sessions-with-more-than-one-intent/m-p/600525#M209049</link>
      <description>&lt;P&gt;Do you have a couple sample events to work the search against.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Because in this event with the eval you are doing, it looks like it will only return values of 1 or 0 for intent_total. So I don’t think you can use that to | where &amp;gt;2 against.&amp;nbsp;&lt;BR /&gt;Unless you are trying to do |where against the new field that is sum in which case it should be written&lt;BR /&gt;| stats sum(intent_total) as intent_total by sessionId&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Jun 2022 18:22:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-count-the-number-of-sessions-with-more-than-one-intent/m-p/600525#M209049</guid>
      <dc:creator>sperkins</dc:creator>
      <dc:date>2022-06-03T18:22:33Z</dc:date>
    </item>
    <item>
      <title>Re: Counting the number of sessions with more than one intent</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-count-the-number-of-sessions-with-more-than-one-intent/m-p/600535#M209054</link>
      <description>&lt;P&gt;I listed 2 sample events below. This is query for a chatbot platform. A conversation between a user and the bot is referred to as a session. A user can hit multiple intents in a session.&lt;/P&gt;&lt;P&gt;I'm trying to group sessions with 0 or 1 intents, and sessions with 2 or more intents.&amp;nbsp;&lt;/P&gt;&lt;P&gt;My original query was just a poor attempt to get to this data.&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;2022-06-03T19:25:53,135+0000 [INFO ] level=INFO  [RxCachedThreadScheduler-10]-[sessionId=0d326922-5526-4ca9-bdf8-c74b9bf665c8 test=false botId=ccb offl_TKT=false proto=V2 platform=WEB input_type=TEXT sku= pn= cid=3fd323ae-5958-4538-8e92-15567ad6d39e convo=]-[FulfillmentServiceImpl]-[381 ] Processing intent: intent=payroll.help_preferences_standard conversation=payroll.help_preferences_standard 
index = conversationintent = payroll.help_preferences_standardlinecount = 1punct = --::,+_[_]_=__[-]-[=----_=_=----_=_=----_=----_=_=sessionId = 0d326922-5526-4ca9-bdf8-c74b9bf665c8splunk_server
6/3/22
12:25:53.133 PM	

2022-06-03T19:25:53,133+0000 [INFO ] level=INFO  [RxCachedThreadScheduler-10]-[sessionId=0d326922-5526-4ca9-bdf8-c74b9bf665c8 test=false botId=ccb offl_TKT=false proto=V2 platform=WEB input_type=TEXT convo=]-[AnalyticsServiceImpl]-[129 ] cuidata=true type=user intent=payroll.update_account confidence=1.0 feedback=false handled=true message="Configurer la paie"; 
index = conversationintent = payroll.update_account = 1punct = --::,+_[_]_=__[-]-[=----_=_=----_=_=----_=----_=_=sessionId = 0d326922-5526-4ca9-bdf8-c74b9bf665c8&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Jun 2022 19:35:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-count-the-number-of-sessions-with-more-than-one-intent/m-p/600535#M209054</guid>
      <dc:creator>KyleMcDougall</dc:creator>
      <dc:date>2022-06-03T19:35:04Z</dc:date>
    </item>
    <item>
      <title>Re: Counting the number of sessions with more than one intent</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-count-the-number-of-sessions-with-more-than-one-intent/m-p/600843#M209145</link>
      <description>&lt;LI-CODE lang="markup"&gt;index=conversation botId=ccb
| eval intent_count=if(like(intent,"%"), "1", "0")
| stats sum(intent_count) as intent_count by sessionId
| addtotals col=t row=f labelfield=sessionId intent_count
| where intent_count &amp;gt;= 2&lt;/LI-CODE&gt;&lt;P&gt;This should only show a Total count and the sessionId's with over two intents.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jun 2022 11:26:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-count-the-number-of-sessions-with-more-than-one-intent/m-p/600843#M209145</guid>
      <dc:creator>sperkins</dc:creator>
      <dc:date>2022-06-07T11:26:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to count the number of sessions with more than one intent?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-count-the-number-of-sessions-with-more-than-one-intent/m-p/600850#M209148</link>
      <description>&lt;P&gt;hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/245650"&gt;@KyleMcDougall&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Have you tried the transaction command this command should group based on sessionID&amp;nbsp; and would give you an eventcount which gives you an idead about the number of intent related to each sessionID whether its&amp;nbsp; 0 or 1 intent and 2 or more intent&amp;nbsp;&lt;/P&gt;&lt;P&gt;|transaction sessionId&amp;nbsp;&lt;/P&gt;&lt;P&gt;just an example&amp;nbsp;&lt;/P&gt;&lt;P&gt;|makeresults |eval sesid="abc1234", data="amber", intent="payroll.help_preferences_standard"&lt;BR /&gt;|append [|makeresults |eval sesid="abc1234", data="new", intent="payroll.update_account"] |transaction sesid |table sesid eventcount intent&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;venky&lt;/P&gt;&lt;P&gt;&amp;nbsp;note:- if it helps karma points are appreciated/if it resolves solution acceptance is appreciated&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jun 2022 12:17:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-count-the-number-of-sessions-with-more-than-one-intent/m-p/600850#M209148</guid>
      <dc:creator>venky1544</dc:creator>
      <dc:date>2022-06-07T12:17:06Z</dc:date>
    </item>
    <item>
      <title>Re: Counting the number of sessions with more than one intent</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-count-the-number-of-sessions-with-more-than-one-intent/m-p/600877#M209159</link>
      <description>&lt;P&gt;Thank you! This is very helpful.&amp;nbsp;&lt;/P&gt;&lt;P&gt;How do I group these into 2 buckets? First bucket is sessions with 0-1 intent_count, and second bucket is =&amp;gt; 2 intent_count.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jun 2022 14:00:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-count-the-number-of-sessions-with-more-than-one-intent/m-p/600877#M209159</guid>
      <dc:creator>KyleMcDougall</dc:creator>
      <dc:date>2022-06-07T14:00:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to count the number of sessions with more than one intent?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-count-the-number-of-sessions-with-more-than-one-intent/m-p/600889#M209163</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/245650"&gt;@KyleMcDougall&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;when you say 2 buckets can you please elaborate do you mean you want two panels in a dashboard ?? are can you share a sample output&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;note:- if it helps karma points are appreciated/if it resolves solution acceptance is appreciated&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jun 2022 14:30:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-count-the-number-of-sessions-with-more-than-one-intent/m-p/600889#M209163</guid>
      <dc:creator>venky1544</dc:creator>
      <dc:date>2022-06-07T14:30:32Z</dc:date>
    </item>
    <item>
      <title>Re: Counting the number of sessions with more than one intent</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-count-the-number-of-sessions-with-more-than-one-intent/m-p/600915#M209170</link>
      <description>&lt;P&gt;index=conversation botId=ccb&lt;BR /&gt;| eval intent_count=if(like(intent,"%"), "1", "0")&lt;BR /&gt;| stats sum(intent_count) as intent_count by sessionId&lt;BR /&gt;| where intent_count &amp;gt;= 2&lt;BR /&gt;| addtotals col=t row=f labelfield=sessionId label="Total Sessions with More Than 2 Intents"&lt;BR /&gt;| append [search index=conversation botId=ccb | eval intent_count=if(like(intent,"%"), "1", "0")&lt;BR /&gt;| stats sum(intent_count) as intent_count by sessionId&lt;BR /&gt;| addtotals row=f col=t labelfield=sessionId label="Total Sessions with Less Than 2 Intents"&lt;BR /&gt;| where intent_count &amp;lt; 2]&lt;BR /&gt;| search sessionId="Total Session*"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This will return the results with two different column totals. The last Search is just a filter to only the totals will show, but if you want the sessionId's to be listed as well you can just take out that last line.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Is this more what you were looking for?&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jun 2022 16:51:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-count-the-number-of-sessions-with-more-than-one-intent/m-p/600915#M209170</guid>
      <dc:creator>sperkins</dc:creator>
      <dc:date>2022-06-07T16:51:46Z</dc:date>
    </item>
    <item>
      <title>Re: Counting the number of sessions with more than one intent</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-count-the-number-of-sessions-with-more-than-one-intent/m-p/600926#M209173</link>
      <description>&lt;P&gt;Yes, this seems like it would be exactly what I'm looking for, but it's only displaying one line. I can't get it to show the "Less than 2 intents" line.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I only see the counts for "Total Sessions with More than 2 Intents."&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I think the "| where intent_count &amp;gt;= 5" line is filtering results for the entire query, which is why it's not showing counts for less than 5.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Could a "bin" command work instead?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jun 2022 18:13:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-count-the-number-of-sessions-with-more-than-one-intent/m-p/600926#M209173</guid>
      <dc:creator>KyleMcDougall</dc:creator>
      <dc:date>2022-06-07T18:13:09Z</dc:date>
    </item>
    <item>
      <title>Re: Counting the number of sessions with more than one intent</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-count-the-number-of-sessions-with-more-than-one-intent/m-p/601010#M209191</link>
      <description>&lt;P&gt;&lt;SPAN&gt;index=conversation botId=ccb&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;| eval intent_count=if(like(intent,"%"), "1", "0")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;| stats sum(intent_count) as intent_count by sessionId&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;| where intent_count &amp;gt;= 2&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;| addtotals col=t row=f labelfield=sessionId label="Total Sessions with More Than 2 Intents"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;| append [search index=conversation botId=ccb | eval intent_count=if(like(intent,"%"), "1", "0")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;| stats sum(intent_count) as intent_count_small by sessionId&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;| addtotals row=f col=t labelfield=sessionId label="Total Sessions with Less Than 2 Intents"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;| where intent_count_small &amp;lt; 2]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;| search sessionId="Total Session*"&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Maybe changing the intent count field name will eliviate that. I am not sure if bin would work, but it could!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Jun 2022 10:05:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-count-the-number-of-sessions-with-more-than-one-intent/m-p/601010#M209191</guid>
      <dc:creator>sperkins</dc:creator>
      <dc:date>2022-06-08T10:05:13Z</dc:date>
    </item>
  </channel>
</rss>

