<?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: Using subset in set analysis comparison in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Using-subset-in-set-analysis-comparison/m-p/1078147#M359551</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok... so my post was premature - I have found the answer. It was p() function (as I suspected &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/wink.png" /&gt;), I just got the syntax wrong when trying it out.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is a template from set analysis doc (link: &lt;A _jive_internal="true" href="https://community.qlik.com/docs/DOC-4951"&gt;https://community.qlik.com/docs/DOC-4951&lt;/A&gt;&lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11pt; color: #000000;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;Syntax: {&amp;lt;Dimension1 = P(&lt;/SPAN&gt;&lt;SPAN style="font-size: 11pt;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;{&amp;lt; {&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 11pt;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;Set Dimension to select&lt;/SPAN&gt;&lt;SPAN style="font-size: 11pt;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;} &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 11pt;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;Dimension1 &lt;/SPAN&gt;&lt;SPAN style="font-size: 11pt;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;}&amp;gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 11pt;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;) [, Other&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 11pt; font-family: 'courier new', courier;"&gt;dimensions of the Set]&amp;gt;}&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 11pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 11pt;"&gt;So, I ended up with: &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 11pt; font-family: 'courier new', courier;"&gt;=sum({&amp;lt;pacct_cal_dt={"$(vDateStart)"}, account_no=p({&amp;lt;pacct_close_dt = {"&amp;gt; $(vDateStart)&amp;lt;=$(vDateEnd)"}&amp;gt; + $&amp;lt;pacct_open_eff_dt_original = {"&amp;gt;$(vDateStart)&amp;lt;=$(vDateEnd)"}, pacct_open_eff_dt_flag = {1} &amp;gt;} account_no)&amp;gt;} pacct_balance)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 11pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 11pt;"&gt;Hope it will help somebody one day &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/wink.png" /&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 11pt;"&gt;Cheers!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 11pt;"&gt;TK&lt;BR style="text-align: -webkit-auto;" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 09 Feb 2016 10:58:18 GMT</pubDate>
    <dc:creator />
    <dc:date>2016-02-09T10:58:18Z</dc:date>
    <item>
      <title>Using subset in set analysis comparison</title>
      <link>https://community.qlik.com/t5/QlikView/Using-subset-in-set-analysis-comparison/m-p/1078146#M359550</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Guys,&lt;/P&gt;&lt;P&gt;What I am looking for is a function or a proper syntax to get a 'sub-select' when doing set analysis. In SQL you could write it as:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;Select ...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;From ...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;Where account = (select distinct account from ... where ...);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to do an analysis on 'sub population'. I think it should look something like that:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;=sum({&amp;lt;cal_date={"$(vDateStart)"}, account={&lt;STRONG&gt;here's the problem&lt;/STRONG&gt;}&amp;gt; balance}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My problem is how to get a subset of accounts, I looked at ValueList - but it does not seem to take 'set analysis'? It should be a distinct selection of accounts that meet the following condition:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;{$&amp;lt;pacct_close_dt = {"&amp;gt; $(vDateStart)&amp;lt;=$(vDateEnd)"}&amp;gt; + $&amp;lt;pacct_open_eff_dt_original = {"&amp;gt;$(vDateStart)&amp;lt;=$(vDateEnd)"}, pacct_open_eff_dt_flag = {1} &amp;gt;}.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;P&gt;And btw. I cannot simply add these conditions to my original sum function - as I will loose few data points that way.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Feb 2016 10:27:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-subset-in-set-analysis-comparison/m-p/1078146#M359550</guid>
      <dc:creator />
      <dc:date>2016-02-09T10:27:17Z</dc:date>
    </item>
    <item>
      <title>Re: Using subset in set analysis comparison</title>
      <link>https://community.qlik.com/t5/QlikView/Using-subset-in-set-analysis-comparison/m-p/1078147#M359551</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok... so my post was premature - I have found the answer. It was p() function (as I suspected &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/wink.png" /&gt;), I just got the syntax wrong when trying it out.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is a template from set analysis doc (link: &lt;A _jive_internal="true" href="https://community.qlik.com/docs/DOC-4951"&gt;https://community.qlik.com/docs/DOC-4951&lt;/A&gt;&lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11pt; color: #000000;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;Syntax: {&amp;lt;Dimension1 = P(&lt;/SPAN&gt;&lt;SPAN style="font-size: 11pt;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;{&amp;lt; {&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 11pt;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;Set Dimension to select&lt;/SPAN&gt;&lt;SPAN style="font-size: 11pt;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;} &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 11pt;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;Dimension1 &lt;/SPAN&gt;&lt;SPAN style="font-size: 11pt;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;}&amp;gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 11pt;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;) [, Other&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 11pt; font-family: 'courier new', courier;"&gt;dimensions of the Set]&amp;gt;}&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 11pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 11pt;"&gt;So, I ended up with: &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 11pt; font-family: 'courier new', courier;"&gt;=sum({&amp;lt;pacct_cal_dt={"$(vDateStart)"}, account_no=p({&amp;lt;pacct_close_dt = {"&amp;gt; $(vDateStart)&amp;lt;=$(vDateEnd)"}&amp;gt; + $&amp;lt;pacct_open_eff_dt_original = {"&amp;gt;$(vDateStart)&amp;lt;=$(vDateEnd)"}, pacct_open_eff_dt_flag = {1} &amp;gt;} account_no)&amp;gt;} pacct_balance)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 11pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 11pt;"&gt;Hope it will help somebody one day &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/wink.png" /&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 11pt;"&gt;Cheers!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 11pt;"&gt;TK&lt;BR style="text-align: -webkit-auto;" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Feb 2016 10:58:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-subset-in-set-analysis-comparison/m-p/1078147#M359551</guid>
      <dc:creator />
      <dc:date>2016-02-09T10:58:18Z</dc:date>
    </item>
  </channel>
</rss>

