<?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 excluding all but one field in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-Analysis-excluding-all-but-one-field/m-p/206730#M62740</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 haven´t prove it, but you can do something like this:&lt;/P&gt;&lt;P&gt;=count({1+$&amp;lt;[Application Type]={"*"}&amp;gt;}[Application Id for Counters])&lt;/P&gt;&lt;P&gt;Best Regards!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 08 Feb 2011 21:44:39 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-02-08T21:44:39Z</dc:date>
    <item>
      <title>Set Analysis excluding all but one field</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-excluding-all-but-one-field/m-p/206729#M62739</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I want to use set analysis to calculate one value regardless of any current selection except one field&lt;/P&gt;&lt;P&gt;I have an expression:&lt;/P&gt;&lt;P style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;=count({1}[Application Id for Counters]) - counts all ids disregarding current selection correctly.&lt;/P&gt;&lt;P style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;I need to make sure that the only one field [Application Type] influences this count&lt;/P&gt;&lt;P style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Feb 2011 21:35:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-excluding-all-but-one-field/m-p/206729#M62739</guid>
      <dc:creator />
      <dc:date>2011-02-08T21:35:26Z</dc:date>
    </item>
    <item>
      <title>Set Analysis excluding all but one field</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-excluding-all-but-one-field/m-p/206730#M62740</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 haven´t prove it, but you can do something like this:&lt;/P&gt;&lt;P&gt;=count({1+$&amp;lt;[Application Type]={"*"}&amp;gt;}[Application Id for Counters])&lt;/P&gt;&lt;P&gt;Best Regards!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Feb 2011 21:44:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-excluding-all-but-one-field/m-p/206730#M62740</guid>
      <dc:creator />
      <dc:date>2011-02-08T21:44:39Z</dc:date>
    </item>
    <item>
      <title>Set Analysis excluding all but one field</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-excluding-all-but-one-field/m-p/206731#M62741</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;does not work.&lt;/P&gt;&lt;P&gt;What * means here? I need to make sure that If I filer on some [Application Type] the count will change.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Feb 2011 21:56:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-excluding-all-but-one-field/m-p/206731#M62741</guid>
      <dc:creator />
      <dc:date>2011-02-08T21:56:07Z</dc:date>
    </item>
    <item>
      <title>Set Analysis excluding all but one field</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-excluding-all-but-one-field/m-p/206732#M62742</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Perhaps this?&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;count({1&amp;lt;[Application Type]=P()&amp;gt;} [Application Id for Counters])&lt;/P&gt;&lt;P&gt;The P() says to use possible application types. I think that won't always be the selected application types, though, if other selections narrow the list down further than your selections. So it's not completely ignoring all other selections in that sense. There are more complicated ways around that, but you may not need them, so let's start with the above. If it works for you, no reason to do something more complicated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Feb 2011 22:41:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-excluding-all-but-one-field/m-p/206732#M62742</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2011-02-08T22:41:30Z</dc:date>
    </item>
    <item>
      <title>Set Analysis excluding all but one field</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-excluding-all-but-one-field/m-p/206733#M62743</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is Application Type a string field?&lt;/P&gt;&lt;P&gt;Try:&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;=count({1&amp;lt;[Application Type]=&lt;BR /&gt; {'$(=if(GetSelectedCount([Application Type])&amp;gt;0,&lt;BR /&gt; GetFieldSelections([Application Type], Chr(39) &amp;amp; ',' &amp;amp; Chr(39)), Chr(42)))'}&amp;gt;}&lt;BR /&gt; [Application Id for Counters])&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;That will pull all Application types when none are selected or only the selected Application Types. The Chr(39) &amp;amp; ',' &amp;amp; Chr(39) is you put quotes around the values. The quotes are only needed on string fields.&lt;/P&gt;&lt;P&gt;Edit: Changed the * to a Chr(42)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Feb 2011 22:42:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-excluding-all-but-one-field/m-p/206733#M62743</guid>
      <dc:creator />
      <dc:date>2011-02-08T22:42:36Z</dc:date>
    </item>
    <item>
      <title>Set Analysis excluding all but one field</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-excluding-all-but-one-field/m-p/206734#M62744</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;And NMiller gives the more complicated but arguably more correct answer. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Feb 2011 22:53:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-excluding-all-but-one-field/m-p/206734#M62744</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2011-02-08T22:53:28Z</dc:date>
    </item>
    <item>
      <title>Set Analysis excluding all but one field</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-excluding-all-but-one-field/m-p/206735#M62745</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you NMiller.&lt;/P&gt;&lt;P&gt;The Application Type is 1 char field.&lt;/P&gt;&lt;P&gt;This expression works correctly only if some [Application Type] is selected. However when there is no selection on this field I need to have a count disregarding this selection ( no filtering on Application Type) - the biggest number. However I am getting 0 with this expression.&lt;/P&gt;&lt;P&gt;Any Ideas?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Feb 2011 23:08:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-excluding-all-but-one-field/m-p/206735#M62745</guid>
      <dc:creator />
      <dc:date>2011-02-08T23:08:56Z</dc:date>
    </item>
    <item>
      <title>Set Analysis excluding all but one field</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-excluding-all-but-one-field/m-p/206736#M62746</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If there are no selections, you should get Application Type = '*', which should show anything.&lt;/P&gt;&lt;P&gt;Put the expression into a table chart, but don't give it a label. When the chart is rendered, you should see the expression with the dollar sign expansion evaluated. When nothing is selected in Application Type, you should see:&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;count({1&amp;lt;[Application Type]={'*'}&amp;gt;} [Application Id for Counters])&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;It should be able to handle no selections.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Feb 2011 23:20:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-excluding-all-but-one-field/m-p/206736#M62746</guid>
      <dc:creator />
      <dc:date>2011-02-08T23:20:39Z</dc:date>
    </item>
    <item>
      <title>Set Analysis excluding all but one field</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-excluding-all-but-one-field/m-p/206737#M62747</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;BR /&gt;The main expression evaluates to "-" when no selection is done,&lt;BR /&gt;When I used count({1&amp;lt;[Application Type]={'*'}&amp;gt;} [Application Id for Counters]) just to test it gives me the correct number, which tels me that when there is no selection evaluation of the expression is not correct.&lt;BR /&gt;I also was wrong - Application Type is a character field -consists of multiple words. Can that be a problem?Could not see the error&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Feb 2011 23:50:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-excluding-all-but-one-field/m-p/206737#M62747</guid>
      <dc:creator />
      <dc:date>2011-02-08T23:50:14Z</dc:date>
    </item>
    <item>
      <title>Set Analysis excluding all but one field</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-excluding-all-but-one-field/m-p/206738#M62748</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Application Type should work whatever the field type is. It could even work for integers, but the quotes are unnecessary and more complicated.&lt;/P&gt;&lt;P&gt;You need to look at the results of your dollar sign expansion. In my sample, with nothing selected, I get ='*' and from your description that expression is working for you when explicitly defined.&lt;/P&gt;&lt;P&gt;Create a chart. Add your expression, but don't give it a label. Make sure no selections are made in Application Type. Copy the cell contents of the expression header and paste it in here.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Feb 2011 17:46:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-excluding-all-but-one-field/m-p/206738#M62748</guid>
      <dc:creator />
      <dc:date>2011-02-09T17:46:23Z</dc:date>
    </item>
    <item>
      <title>Set Analysis excluding all but one field</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-excluding-all-but-one-field/m-p/206739#M62749</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I do not see how I can get '*' , from the expression you gave. the Char(42) does not have quotes around it. Do I need them?&lt;/P&gt;&lt;P&gt;='$(=if(GetSelectedCount([Application Type])&amp;gt;0, GetFieldSelections([Application Type], Chr(39) &amp;amp; ',' &amp;amp; Chr(39)), Chr(42)))'&lt;/P&gt;&lt;P&gt;I am having some trouble evaluating $ expression in the chart header. Do I use only&lt;/P&gt;&lt;P&gt;=&lt;B&gt;&lt;I&gt;'$(=if(GetSelectedCount([Application Type])&amp;gt;0, GetFieldSelections([Application Type], Chr(39) &amp;amp; '&lt;/I&gt;&lt;/B&gt;,' &amp;amp; Chr(39)), Chr(42)))'&lt;/P&gt;&lt;P&gt;in the header chart and no dimension and no expressions?&lt;/P&gt;&lt;P&gt;If I do that I see * without quotes&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Feb 2011 19:16:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-excluding-all-but-one-field/m-p/206739#M62749</guid>
      <dc:creator />
      <dc:date>2011-02-10T19:16:36Z</dc:date>
    </item>
    <item>
      <title>Set Analysis excluding all but one field</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-excluding-all-but-one-field/m-p/206740#M62750</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No, you don't need to add quotes around chr(42). When he says to "Put the expression into a table chart, but don't give it a label", what he means by "the expression" is the expression he gave you, not some portion of the expression. The whole thing. If you do that (see attached), you will see what he shows you when there's no application type selected, including the single quotes. There ARE single quotes in the expression he gave you. They are outside of the dollar sign expansion, '$(=...)'. If you're not getting single quotes, then you probably copied his expression wrong.&lt;/P&gt;&lt;P&gt;If you play with the attached example, you'll see that NMiller's expression (on the top) is returning the right data, or at least the right data as best I understand your requirement. Since it's the only thing in the chart and there's no label, you can also see how it responds to selections of Application Type. If there are any selected, it lists them. If there are none selected, it uses '*'. Either way, it gives the right count.&lt;/P&gt;&lt;P&gt;The expression I provided is second. If you play with the selections, you can see that it does ignore "Other Field" in the sense that if an Application Type is allowed, it counts all records, not just records that match "Other Field". However, it fails in that if an application type is completely disallowed by the other field selection, its records will NOT be counted. This may still match some people's requirements, but seems less likely to than NMiller's expression.&lt;/P&gt;&lt;P&gt;The third chart shows a third possibility. I think this one will be slightly more efficient when nothing is selected. Rather than reducing to searching for '*', it actually removes that part of the set analysis completely. I doubt any performance difference would be noticeable in practice, though.&lt;/P&gt;&lt;P&gt;And hopefully this discussion also makes it clear why it's so helpful to post an example application with questions like this. There's no reason that we should be having this sort of back and forth discussion about what is and isn't right. There's no reason we should be trying to debug your code without even being able to see your code. We should all be looking at the same application, and it should be obvious whether it's right or wrong.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Feb 2011 19:57:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-excluding-all-but-one-field/m-p/206740#M62750</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2011-02-10T19:57:06Z</dc:date>
    </item>
    <item>
      <title>Set Analysis excluding all but one field</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-excluding-all-but-one-field/m-p/206741#M62751</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thank you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Feb 2011 23:55:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-excluding-all-but-one-field/m-p/206741#M62751</guid>
      <dc:creator />
      <dc:date>2011-02-10T23:55:07Z</dc:date>
    </item>
  </channel>
</rss>

