<?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: Sequence analysis (aggr vs Group By?) in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Sequence-analysis-aggr-vs-Group-By/m-p/1355770#M832639</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Sunny,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you it works pretty well!&lt;/P&gt;&lt;P&gt;However, I'd like to understand a bit more how this works.&lt;/P&gt;&lt;P&gt;Does it count sessions containing a Start, Action and End type?&lt;/P&gt;&lt;P&gt;What does the P({}) mean?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your answer,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 14 Jun 2017 19:34:25 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2017-06-14T19:34:25Z</dc:date>
    <item>
      <title>Sequence analysis (aggr vs Group By?)</title>
      <link>https://community.qlik.com/t5/QlikView/Sequence-analysis-aggr-vs-Group-By/m-p/1355764#M832633</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Everyone,&lt;/P&gt;&lt;P&gt;I would like to analyze data but I'm not really sure how to start this analysis.&lt;/P&gt;&lt;P&gt;I'd like to count the number of "Start" in column "Type" only if the session x contains at least 1 type "Start", 1 type "Action" and 1 type "End".&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" height="245" style="border: 1px solid rgb(0, 0, 0); width: 270px; height: 247px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Session_ID&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Type&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;P&gt;Start&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;End&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;2&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;Start&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;2&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;Action&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;2&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;Action&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;2&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;End&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;3&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;Start&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;3&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;Action&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;3&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;End&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Typically, in the example hereabove, i would get 2 as session 1 is not considered as valid.&lt;/P&gt;&lt;P&gt;Here is where I can't get my mind to it. I think the usage of group by doing the import is not good as I would also need the sessions not to be grouped (so I would have to make several imports). Now, if I'd like to use aggr, I would need to merge all "Types" rows for a session and check for the string "Start, Action* End" (but I don't really know how to do.&lt;/P&gt;&lt;P&gt;What do you guys think would be the best option? Also, how can I merge the "type" rows to do what I want?&lt;/P&gt;&lt;P&gt;Thank you for your help.&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sequence-analysis-aggr-vs-Group-By/m-p/1355764#M832633</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Sequence analysis (aggr vs Group By?)</title>
      <link>https://community.qlik.com/t5/QlikView/Sequence-analysis-aggr-vs-Group-By/m-p/1355765#M832634</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe something like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Sum( Aggr( If(Concat(DISTINCT Type,'|') ='Action|End|Start',1,0), Session_ID))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Though this is not checking if the Types are appearing exactely once (you can remove the DISTINCT to do this).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Jun 2017 21:08:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sequence-analysis-aggr-vs-Group-By/m-p/1355765#M832634</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2017-06-12T21:08:52Z</dc:date>
    </item>
    <item>
      <title>Re: Sequence analysis (aggr vs Group By?)</title>
      <link>https://community.qlik.com/t5/QlikView/Sequence-analysis-aggr-vs-Group-By/m-p/1355766#M832635</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, there is a long but simpler way on script side: first calculate distinct type count per session id (must be something like LOAD Session_ID, COUNT(DISTINCT Type) AS Type_Count FROM [Your Table] GROUP BY Session_ID), then you can select which one has 3 count (in this case, it is where Type_Count column equals to 3).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Jun 2017 01:08:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sequence-analysis-aggr-vs-Group-By/m-p/1355766#M832635</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-06-13T01:08:22Z</dc:date>
    </item>
    <item>
      <title>Re: Sequence analysis (aggr vs Group By?)</title>
      <link>https://community.qlik.com/t5/QlikView/Sequence-analysis-aggr-vs-Group-By/m-p/1355767#M832636</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can also try this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=Count(DISTINCT {&amp;lt;Session_ID = P({&amp;lt;Type = {'End'}&amp;gt;})*P({&amp;lt;Type = {'Start'}&amp;gt;})*P({&amp;lt;Type = {'Action'}&amp;gt;})&amp;gt;} Session_ID)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/166600_Capture.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Jun 2017 01:47:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sequence-analysis-aggr-vs-Group-By/m-p/1355767#M832636</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-06-13T01:47:28Z</dc:date>
    </item>
    <item>
      <title>Re: Sequence analysis (aggr vs Group By?)</title>
      <link>https://community.qlik.com/t5/QlikView/Sequence-analysis-aggr-vs-Group-By/m-p/1355768#M832637</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Thank you for your answer.&lt;/P&gt;&lt;P&gt;The thing is, I don't always have 3 counts and 3 counts are not necessarily good (Start, Error, End for instance).&lt;/P&gt;&lt;P&gt;Is it possible to add the distinction of type (text) in the load?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Jun 2017 19:17:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sequence-analysis-aggr-vs-Group-By/m-p/1355768#M832637</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-06-14T19:17:59Z</dc:date>
    </item>
    <item>
      <title>Re: Sequence analysis (aggr vs Group By?)</title>
      <link>https://community.qlik.com/t5/QlikView/Sequence-analysis-aggr-vs-Group-By/m-p/1355769#M832638</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Stefan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is this valid if I have 1 action or more like using joker characters?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Jun 2017 19:22:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sequence-analysis-aggr-vs-Group-By/m-p/1355769#M832638</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-06-14T19:22:13Z</dc:date>
    </item>
    <item>
      <title>Re: Sequence analysis (aggr vs Group By?)</title>
      <link>https://community.qlik.com/t5/QlikView/Sequence-analysis-aggr-vs-Group-By/m-p/1355770#M832639</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Sunny,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you it works pretty well!&lt;/P&gt;&lt;P&gt;However, I'd like to understand a bit more how this works.&lt;/P&gt;&lt;P&gt;Does it count sessions containing a Start, Action and End type?&lt;/P&gt;&lt;P&gt;What does the P({}) mean?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your answer,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Jun 2017 19:34:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sequence-analysis-aggr-vs-Group-By/m-p/1355770#M832639</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-06-14T19:34:25Z</dc:date>
    </item>
    <item>
      <title>Re: Sequence analysis (aggr vs Group By?)</title>
      <link>https://community.qlik.com/t5/QlikView/Sequence-analysis-aggr-vs-Group-By/m-p/1355771#M832640</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, the * sign between the three p() means the intersection. The set analysis is saying that include only those session_ids where all three types exists. Look here for p() and e(): &lt;A href="https://community.qlik.com/thread/68931"&gt;P() &amp;amp;amp; E() and where do you use them?&lt;/A&gt;‌&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For more advanced set analysis, check here&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/docs/DOC-4951"&gt;Set Analysis: syntaxes, examples&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Jun 2017 11:08:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sequence-analysis-aggr-vs-Group-By/m-p/1355771#M832640</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-06-15T11:08:21Z</dc:date>
    </item>
  </channel>
</rss>

