<?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 Set Analysis riddle in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-Analysis-riddle/m-p/181099#M501871</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To all of you Set Analysis wizards...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to achieve through a set analysis expression a second level of aggregation:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me explain...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Consider the following scenario:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sessions:&lt;/P&gt;&lt;P&gt;LOAD * INLINE [&lt;/P&gt;&lt;P&gt;User, Document, Session Start, Session End, Session Duration&lt;/P&gt;&lt;P&gt;David, B,11-1-2011 18:32:00, 12-1-2011 20:00:45, 1:28:00&lt;/P&gt;&lt;P&gt;David, A,1-9-2010 16:57:00, 2-9-2010 17:33:00, 0:43&lt;/P&gt;&lt;P&gt;David, A,1-9-2010 23:57:00, 2-9-2010 0:00:00, 0:33&lt;/P&gt;&lt;P&gt;David, A,1-10-2010 9:36:00, 2-10-2010 10:00:00, 0:24:00&lt;/P&gt;&lt;P&gt;David, A,12-1-2011 7:48:00, 13-1-2011 9:52:00, 2:04:00&lt;/P&gt;&lt;P&gt;Sandra, A,3-1-2011 8:48:00, 3-1-2011 10:01:00, 1:12:37&lt;/P&gt;&lt;P&gt;Sandra, B,4-1-2011 18:32:00, 4-1-2011 20:45:00, 2:12:53&lt;/P&gt;&lt;P&gt;Viktor, F,1-10-2010 9:36:00, 2-10-2010 10:00:00, 0:24:00&lt;/P&gt;&lt;P&gt;Viktor, D,18-12-2010 20:55:00, 19-12-2010 1:55:00, 5:00:00&lt;/P&gt;&lt;P&gt;Viktor, A,7-1-2011 7:00:00, 7-1-2011 8:00:00, 1:00:00&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;P&gt;Show in a Pivot table all the users, logged on in a given period with total session duration of 5 hours&lt;/P&gt;&lt;P&gt;I've achieved this in two steps:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;P&gt;In user's calculated dimension set the following expression:&lt;/P&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Aggr(&lt;/P&gt;&lt;P&gt;sum({$&amp;lt;[Session Start] = {'&amp;gt;=$(=(vcPeriodBeginDate)) &amp;lt;=$(=(vcPeriodEndDate))'}&amp;gt;}[Session Duration]),&lt;/P&gt;&lt;P&gt;[User]&lt;/P&gt;&lt;P&gt;) &amp;lt;= Interval#('10:00:00')&lt;/P&gt;&lt;P&gt;,User)&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;OL&gt;&lt;LI&gt;&lt;OL start="2"&gt;&lt;LI&gt;&lt;P&gt;In the 'Duration' chart expression set the following code:&lt;/P&gt;&lt;P&gt;sum({$&amp;lt;[Session Start] = {'&amp;gt;=$(=(vcPeriodBeginDate)) &amp;lt;=$(=(vcPeriodEndDate))'}&amp;gt;}&lt;/P&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;IF(&lt;/P&gt;&lt;P&gt;Aggr(&lt;/P&gt;&lt;P&gt;sum({$&amp;lt;[Session Start] = {'&amp;gt;=$(=(vcPeriodBeginDate)) &amp;lt;=$(=(vcPeriodEndDate))'}&amp;gt;}[Session Duration]),&lt;/P&gt;&lt;P&gt;[User]&lt;/P&gt;&lt;P&gt;) &amp;lt; Interval#('5:00:00')&lt;/P&gt;&lt;P&gt;,[Session Duration]&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;This gives the advisable results:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="error loading image" class="jive-image error-loading-image" src="https://community.qlik.com/legacyfs/online/-3325_sourceID:3325" /&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;OL start="2"&gt;&lt;LI&gt;&lt;P&gt;In the second scenario I would like to show in a textbox the total session duration for the subset (2:40:37)&lt;/P&gt;&lt;P&gt;Now this is where i'm stuck....&lt;/P&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've attached a file as an example&lt;/P&gt;&lt;P&gt;Your help is more than appreciated!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dror&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 24 Jan 2011 09:50:17 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-01-24T09:50:17Z</dc:date>
    <item>
      <title>Set Analysis riddle</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-riddle/m-p/181099#M501871</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To all of you Set Analysis wizards...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to achieve through a set analysis expression a second level of aggregation:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me explain...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Consider the following scenario:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sessions:&lt;/P&gt;&lt;P&gt;LOAD * INLINE [&lt;/P&gt;&lt;P&gt;User, Document, Session Start, Session End, Session Duration&lt;/P&gt;&lt;P&gt;David, B,11-1-2011 18:32:00, 12-1-2011 20:00:45, 1:28:00&lt;/P&gt;&lt;P&gt;David, A,1-9-2010 16:57:00, 2-9-2010 17:33:00, 0:43&lt;/P&gt;&lt;P&gt;David, A,1-9-2010 23:57:00, 2-9-2010 0:00:00, 0:33&lt;/P&gt;&lt;P&gt;David, A,1-10-2010 9:36:00, 2-10-2010 10:00:00, 0:24:00&lt;/P&gt;&lt;P&gt;David, A,12-1-2011 7:48:00, 13-1-2011 9:52:00, 2:04:00&lt;/P&gt;&lt;P&gt;Sandra, A,3-1-2011 8:48:00, 3-1-2011 10:01:00, 1:12:37&lt;/P&gt;&lt;P&gt;Sandra, B,4-1-2011 18:32:00, 4-1-2011 20:45:00, 2:12:53&lt;/P&gt;&lt;P&gt;Viktor, F,1-10-2010 9:36:00, 2-10-2010 10:00:00, 0:24:00&lt;/P&gt;&lt;P&gt;Viktor, D,18-12-2010 20:55:00, 19-12-2010 1:55:00, 5:00:00&lt;/P&gt;&lt;P&gt;Viktor, A,7-1-2011 7:00:00, 7-1-2011 8:00:00, 1:00:00&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;P&gt;Show in a Pivot table all the users, logged on in a given period with total session duration of 5 hours&lt;/P&gt;&lt;P&gt;I've achieved this in two steps:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;P&gt;In user's calculated dimension set the following expression:&lt;/P&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Aggr(&lt;/P&gt;&lt;P&gt;sum({$&amp;lt;[Session Start] = {'&amp;gt;=$(=(vcPeriodBeginDate)) &amp;lt;=$(=(vcPeriodEndDate))'}&amp;gt;}[Session Duration]),&lt;/P&gt;&lt;P&gt;[User]&lt;/P&gt;&lt;P&gt;) &amp;lt;= Interval#('10:00:00')&lt;/P&gt;&lt;P&gt;,User)&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;OL&gt;&lt;LI&gt;&lt;OL start="2"&gt;&lt;LI&gt;&lt;P&gt;In the 'Duration' chart expression set the following code:&lt;/P&gt;&lt;P&gt;sum({$&amp;lt;[Session Start] = {'&amp;gt;=$(=(vcPeriodBeginDate)) &amp;lt;=$(=(vcPeriodEndDate))'}&amp;gt;}&lt;/P&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;IF(&lt;/P&gt;&lt;P&gt;Aggr(&lt;/P&gt;&lt;P&gt;sum({$&amp;lt;[Session Start] = {'&amp;gt;=$(=(vcPeriodBeginDate)) &amp;lt;=$(=(vcPeriodEndDate))'}&amp;gt;}[Session Duration]),&lt;/P&gt;&lt;P&gt;[User]&lt;/P&gt;&lt;P&gt;) &amp;lt; Interval#('5:00:00')&lt;/P&gt;&lt;P&gt;,[Session Duration]&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;This gives the advisable results:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="error loading image" class="jive-image error-loading-image" src="https://community.qlik.com/legacyfs/online/-3325_sourceID:3325" /&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;OL start="2"&gt;&lt;LI&gt;&lt;P&gt;In the second scenario I would like to show in a textbox the total session duration for the subset (2:40:37)&lt;/P&gt;&lt;P&gt;Now this is where i'm stuck....&lt;/P&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've attached a file as an example&lt;/P&gt;&lt;P&gt;Your help is more than appreciated!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dror&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Jan 2011 09:50:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-riddle/m-p/181099#M501871</guid>
      <dc:creator />
      <dc:date>2011-01-24T09:50:17Z</dc:date>
    </item>
    <item>
      <title>Set Analysis riddle</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-riddle/m-p/181100#M501872</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hei i dont understand whtat your problem if you take your expression and put it in a text box you are getting the total time of the users who qualify for the table so what is the problem exctly&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Jan 2011 10:55:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-riddle/m-p/181100#M501872</guid>
      <dc:creator>lironbaram</dc:creator>
      <dc:date>2011-01-24T10:55:51Z</dc:date>
    </item>
    <item>
      <title>Set Analysis riddle</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-riddle/m-p/181101#M501873</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Roi hi,&lt;/P&gt;&lt;P&gt;My problem is that i don''t know how obtain in a single expression, the TOTAL session duration of all users that were:&lt;/P&gt;&lt;P&gt;a. logged in in, let''s say, the last month and...&lt;/P&gt;&lt;P&gt;b. with total session duration of not more than 5:00&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dror&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Jan 2011 11:09:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-riddle/m-p/181101#M501873</guid>
      <dc:creator />
      <dc:date>2011-01-24T11:09:26Z</dc:date>
    </item>
    <item>
      <title>Set Analysis riddle</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-riddle/m-p/181102#M501874</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;but that exactly what your expression those&lt;/P&gt;&lt;P&gt;put it in chart with out dimension and youll get the total result&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Jan 2011 11:16:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-riddle/m-p/181102#M501874</guid>
      <dc:creator>lironbaram</dc:creator>
      <dc:date>2011-01-24T11:16:02Z</dc:date>
    </item>
    <item>
      <title>Set Analysis riddle</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-riddle/m-p/181103#M501875</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This figure needs to be presented in a text box. and addition, part of the calculation is done in the Calculated dimension.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dror&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Jan 2011 11:21:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-riddle/m-p/181103#M501875</guid>
      <dc:creator />
      <dc:date>2011-01-24T11:21:09Z</dc:date>
    </item>
    <item>
      <title>Set Analysis riddle</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-riddle/m-p/181104#M501876</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;but why do you need the calculated dimmension&lt;/P&gt;&lt;P&gt;its acctualy the same condition as in the expression&lt;/P&gt;&lt;P&gt;remove the caculated dimmension from the table&lt;/P&gt;&lt;P&gt;and put the regular user dim&lt;/P&gt;&lt;P&gt;you'll get the same result&lt;/P&gt;&lt;P&gt;i am a liitle bit confused of your logic&lt;/P&gt;&lt;P&gt;can you explain why check the same conditon twice&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Jan 2011 11:45:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-riddle/m-p/181104#M501876</guid>
      <dc:creator>lironbaram</dc:creator>
      <dc:date>2011-01-24T11:45:59Z</dc:date>
    </item>
    <item>
      <title>Set Analysis riddle</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-riddle/m-p/181105#M501877</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Roi,&lt;/P&gt;&lt;P&gt;You're correct. I've mistakenly i've uploaded the wrong version. Setting the SA expression in a textbox does produce the correct results. THANKS!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Toda rabba &lt;IMG alt="Wink" src="http://community.qlik.com/emoticons/emotion-5.gif" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dror&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Jan 2011 11:59:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-riddle/m-p/181105#M501877</guid>
      <dc:creator />
      <dc:date>2011-01-24T11:59:37Z</dc:date>
    </item>
  </channel>
</rss>

