<?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 with subset filter in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-subset-filter/m-p/156239#M501423</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello again Miguel,&lt;/P&gt;&lt;P&gt;Ignore my last quick reply, I have success! Thanks for the prompt on the quotes. For the benefit of anyone reading this here is the solution. It was pesky brackets at fault!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;=count(distinct {$&amp;lt;&lt;BR /&gt; [Posted Year] = {$(#=year(AddMonths(makedate(Year,Month,01),0)))},&lt;BR /&gt; [Posted Month] = {$(#=month(AddMonths(makedate(Year,Month,01),0)))},&lt;BR /&gt; [Line Number] = {2},&lt;BR /&gt; linkVendorInvoiceHeader = {$(= chr(34) &amp;amp; concat(&lt;BR /&gt; {&amp;lt;&lt;BR /&gt; [Posted Year] = {$(#=year(AddMonths(makedate(Year,Month,01),0)))},&lt;BR /&gt; [Posted Month] = {$(#=month(AddMonths(makedate(Year,Month,01),0)))},&lt;BR /&gt; [Line Number] = {1},&lt;BR /&gt; IncludedInFirstTimePass = {1}&lt;BR /&gt; &amp;gt;} distinct linkVendorInvoiceHeader,&lt;BR /&gt; chr(34) &amp;amp; ',' &amp;amp; chr(34)) &amp;amp; chr(34))&lt;BR /&gt;&lt;BR /&gt; }&amp;gt;} linkVendorInvoiceHeader)&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 11 Mar 2011 10:52:09 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-03-11T10:52:09Z</dc:date>
    <item>
      <title>Set Analysis with subset filter</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-subset-filter/m-p/156236#M501420</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am turning to the forum as I have exhausted all my investigation on this subject. I have a requirement to count a number of distinct values where specific values in a previous piece of set analysis have occured. In essence a subset of values to be part of the where clause. Below is the code I am trying to do, I think I am missing a symbol or something but sure I am very close to the solution:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;=count(distinct {$&amp;lt;&lt;BR /&gt; [Posted Year] = {$(#=year(AddMonths(makedate(Year,Month,01),0)))},&lt;BR /&gt; [Posted Month] = {$(#=month(AddMonths(makedate(Year,Month,01),0)))},&lt;BR /&gt; [Line Number] = {2},&lt;BR /&gt; linkVendorInvoiceHeader =&lt;BR /&gt; {"$&lt;BR /&gt; (= chr(34) &amp;amp; concat(&lt;BR /&gt; {&amp;lt;&lt;BR /&gt; [Posted Year] = {$(#=year(AddMonths(makedate(Year,Month,01),0)))},&lt;BR /&gt; [Posted Month] = {$(#=month(AddMonths(makedate(Year,Month,01),0)))},&lt;BR /&gt; [Line Number] = {1},&lt;BR /&gt; IncludedInFirstTimePass = {1}&lt;BR /&gt; &amp;gt;} distinct linkVendorInvoiceHeader,&lt;BR /&gt; chr(34) &amp;amp; ',' &amp;amp; chr(34)) &amp;amp; chr(34)&lt;BR /&gt; "}&amp;gt;}&lt;BR /&gt;&lt;BR /&gt; linkVendorInvoiceHeader)&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;The specific area of the subset when run seperatley works as expected, heres the code on its own:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;= chr(34) &amp;amp; concat(&lt;BR /&gt; {&amp;lt;&lt;BR /&gt; [Posted Year] = {$(#=year(AddMonths(makedate(Year,Month,01),0)))},&lt;BR /&gt; [Posted Month] = {$(#=month(AddMonths(makedate(Year,Month,01),0)))},&lt;BR /&gt; [Line Number] = {1},&lt;BR /&gt; IncludedInFirstTimePass = {1}&lt;BR /&gt; &amp;gt;} distinct linkVendorInvoiceHeader,&lt;BR /&gt;chr(34) &amp;amp; ',' &amp;amp; chr(34)) &amp;amp; chr(34) &lt;B&gt;&lt;/B&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This returns values like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;"a1","a2","a3","a4"&lt;/PRE&gt;So when I manually copy and paste the text results into the top code example the figures return. But it doesnt work dynamically. If anyone guru's out there know what is syntaxtically wrong with my code please help&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Jon&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Mar 2011 10:04:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-subset-filter/m-p/156236#M501420</guid>
      <dc:creator />
      <dc:date>2011-03-11T10:04:38Z</dc:date>
    </item>
    <item>
      <title>Set Analysis with subset filter</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-subset-filter/m-p/156237#M501421</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Jon,&lt;/P&gt;&lt;P&gt;Then you are double double quoting if I'm not wrong (remove double quotes where the bold brackets):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="jive_text_macro jive_macro_quote" jivemacro="quote"&gt;&lt;BR /&gt;Interserve wrote:=count(distinct {tiny_mce_markerlt;&amp;lt;blockquote&amp;gt;&amp;lt;pre&amp;gt; [Posted Year] = {$(#=year(AddMonths(makedate(Year,Month,01),0)))},&lt;BR /&gt; [Posted Month] = {$(#=month(AddMonths(makedate(Year,Month,01),0)))},&lt;BR /&gt; [Line Number] = {2},&lt;BR /&gt; linkVendorInvoiceHeader =&lt;BR /&gt; &lt;B&gt;{&lt;/B&gt;$&lt;BR /&gt; (= chr(34) &amp;amp; concat(&lt;BR /&gt; {&amp;lt;&lt;BR /&gt; [Posted Year] = {$(#=year(AddMonths(makedate(Year,Month,01),0)))},&lt;BR /&gt; [Posted Month] = {$(#=month(AddMonths(makedate(Year,Month,01),0)))},&lt;BR /&gt; [Line Number] = {1},&lt;BR /&gt; IncludedInFirstTimePass = {1}&lt;BR /&gt; &amp;gt;} distinct linkVendorInvoiceHeader,&lt;BR /&gt; chr(34) &amp;amp; ',' &amp;amp; chr(34)) &amp;amp; chr(34)&lt;BR /&gt; &lt;B&gt;}&lt;/B&gt;&amp;gt;}&lt;BR /&gt;&lt;BR /&gt; linkVendorInvoiceHeader)&lt;/PRE&gt;&lt;DIV style="clear:both;"&gt;&lt;/DIV&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Mar 2011 10:24:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-subset-filter/m-p/156237#M501421</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2011-03-11T10:24:41Z</dc:date>
    </item>
    <item>
      <title>Set Analysis with subset filter</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-subset-filter/m-p/156238#M501422</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Miguel,&lt;/P&gt;&lt;P&gt;Thanks for the quick responce! Your code does not show bold but take it you mean removing the double quotes from linkVendorInvoiceHeader = {"$.&lt;/P&gt;&lt;P&gt;I did that but rather than a "0" being displayed in the results I now get "-" which tells me there is a problem...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Mar 2011 10:33:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-subset-filter/m-p/156238#M501422</guid>
      <dc:creator />
      <dc:date>2011-03-11T10:33:55Z</dc:date>
    </item>
    <item>
      <title>Set Analysis with subset filter</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-subset-filter/m-p/156239#M501423</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello again Miguel,&lt;/P&gt;&lt;P&gt;Ignore my last quick reply, I have success! Thanks for the prompt on the quotes. For the benefit of anyone reading this here is the solution. It was pesky brackets at fault!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;=count(distinct {$&amp;lt;&lt;BR /&gt; [Posted Year] = {$(#=year(AddMonths(makedate(Year,Month,01),0)))},&lt;BR /&gt; [Posted Month] = {$(#=month(AddMonths(makedate(Year,Month,01),0)))},&lt;BR /&gt; [Line Number] = {2},&lt;BR /&gt; linkVendorInvoiceHeader = {$(= chr(34) &amp;amp; concat(&lt;BR /&gt; {&amp;lt;&lt;BR /&gt; [Posted Year] = {$(#=year(AddMonths(makedate(Year,Month,01),0)))},&lt;BR /&gt; [Posted Month] = {$(#=month(AddMonths(makedate(Year,Month,01),0)))},&lt;BR /&gt; [Line Number] = {1},&lt;BR /&gt; IncludedInFirstTimePass = {1}&lt;BR /&gt; &amp;gt;} distinct linkVendorInvoiceHeader,&lt;BR /&gt; chr(34) &amp;amp; ',' &amp;amp; chr(34)) &amp;amp; chr(34))&lt;BR /&gt;&lt;BR /&gt; }&amp;gt;} linkVendorInvoiceHeader)&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Mar 2011 10:52:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-subset-filter/m-p/156239#M501423</guid>
      <dc:creator />
      <dc:date>2011-03-11T10:52:09Z</dc:date>
    </item>
    <item>
      <title>Set Analysis with subset filter</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-subset-filter/m-p/156240#M501424</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Your original expression may be correct, but I think you want to enclose the characters returned from the inner set with single quotes, rather than double.&lt;/P&gt;&lt;P&gt;In other words, change chr(34) to chr(39).&lt;/P&gt;&lt;P&gt;Hope that helps&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Mar 2011 11:21:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-subset-filter/m-p/156240#M501424</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2011-03-11T11:21:56Z</dc:date>
    </item>
  </channel>
</rss>

