<?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: Help with Set analysis syntax in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Help-with-Set-analysis-syntax/m-p/1130111#M890276</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I found the error. It had to do with the count function (see link to post by &lt;A href="https://community.qlik.com/qlik-users/4003"&gt;hic&lt;/A&gt; below) . I was counting a key field (not wanting a distinct result) and then the count does not work (when you think of it, it is obvious, but I've never thought of it in the past). I don't know why it worked in the older file (it's a key field there as well), but at least I found the error. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And thanks for all the help and suggestions!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-blogpost/3734"&gt;Count or Count distinct?&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 19 Aug 2016 08:16:23 GMT</pubDate>
    <dc:creator />
    <dc:date>2016-08-19T08:16:23Z</dc:date>
    <item>
      <title>Help with Set analysis syntax</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-Set-analysis-syntax/m-p/1130102#M890267</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a set analysis expression that used to work, but suddenly it doesn't (well, it does in one application but not in a later version of the same application), which leads me to think that I've done something wrong in the syntax.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I want to do is to calculate the number of suppliers (UniqueCountSupplierNumber) that only exists once. I also only want to take the current month into consideration (I have a variable for that set anaylis).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;count&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;( {&amp;lt; &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;$(vCurrentMonthSet)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;, UniqueCountSupplierNumber = {&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;"=count( {1&amp;lt;$(vCurrentMonthSet)&amp;gt;} UniqueCountSupplierNumber)=1"&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;} &amp;gt;} UniqueCountSupplierNumber ) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Any thoughts on how I should change the expression or how I could reach the same result in another way?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Regards, Anders&lt;/SPAN&gt;&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/Help-with-Set-analysis-syntax/m-p/1130102#M890267</guid>
      <dc:creator />
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Set analysis syntax</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-Set-analysis-syntax/m-p/1130103#M890268</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't see anything wrong with the expression. Would you be able to share a sample to see what might not be working?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Aug 2016 08:29:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-Set-analysis-syntax/m-p/1130103#M890268</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-08-18T08:29:38Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Set analysis syntax</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-Set-analysis-syntax/m-p/1130104#M890269</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What is the expression for &lt;SPAN style="color: #800000;"&gt;vCurrentMonthSet and&amp;nbsp; what value does the is the variable set to?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Aug 2016 08:40:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-Set-analysis-syntax/m-p/1130104#M890269</guid>
      <dc:creator>Colin-Albert</dc:creator>
      <dc:date>2016-08-18T08:40:25Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Set analysis syntax</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-Set-analysis-syntax/m-p/1130105#M890270</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you add the expression to a straight table chart with a blank column label, then you can see how the set expression is being expanded by examining the column label when viewing the chart&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Aug 2016 08:42:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-Set-analysis-syntax/m-p/1130105#M890270</guid>
      <dc:creator>Colin-Albert</dc:creator>
      <dc:date>2016-08-18T08:42:08Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Set analysis syntax</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-Set-analysis-syntax/m-p/1130106#M890271</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Hi,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;I took away the variable for the month and did an explicit search instead. It makes it simpler to undersand, but unfortunately it still does not work...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;count&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;( {&amp;lt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;SpendMonth#&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={'44'}, &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;UniqueCountSupplierNumber&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; = {&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;"=count( {1&amp;lt; SpendMonth#={'44'}&amp;gt;} UniqueCountSupplierNumber)=1"&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;} &amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;UniqueCountSupplierNumber&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; ) &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Aug 2016 08:56:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-Set-analysis-syntax/m-p/1130106#M890271</guid>
      <dc:creator />
      <dc:date>2016-08-18T08:56:39Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Set analysis syntax</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-Set-analysis-syntax/m-p/1130107#M890272</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Unfortunately not. It's part of a large application that I cannot share. And the strange thing is that the expression works in an older version, but not in the current one...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Aug 2016 08:57:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-Set-analysis-syntax/m-p/1130107#M890272</guid>
      <dc:creator />
      <dc:date>2016-08-18T08:57:43Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Set analysis syntax</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-Set-analysis-syntax/m-p/1130108#M890273</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #0000ff;"&gt;count&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;( {$&amp;lt; "&lt;/SPAN&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;EM style="font-weight: inherit; font-size: 8pt; font-family: inherit; color: #808080;"&gt;$(vCurrentMonthSet)"&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;, UniqueCountSupplierNumber = {&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #800000;"&gt;"=count( {1&amp;lt;"$(vCurrentMonthSet)"&amp;gt;} UniqueCountSupplierNumber)=1"&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;} &amp;gt;} UniqueCountSupplierNumber )&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Or else reply to colin&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Aug 2016 09:00:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-Set-analysis-syntax/m-p/1130108#M890273</guid>
      <dc:creator>Anil_Babu_Samineni</dc:creator>
      <dc:date>2016-08-18T09:00:51Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Set analysis syntax</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-Set-analysis-syntax/m-p/1130109#M890274</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you view your expression in a straight table chart with a blank label, what does the label show for the&lt;/P&gt;&lt;P&gt;expression field? &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;count&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;( {&amp;lt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;SpendMonth#&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={'44'}, &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;UniqueCountSupplierNumber&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; = {&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;"=count( {1&amp;lt; SpendMonth#={'44'}&amp;gt;} UniqueCountSupplierNumber)=1"&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;} &amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;UniqueCountSupplierNumber&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; ) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;You may need to change the header row to show several rows and make the column wider to see this.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Does the UniqueCountSupplierNumber field resolve to valid value?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Can you send a screen-shot of the column header?&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Aug 2016 11:21:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-Set-analysis-syntax/m-p/1130109#M890274</guid>
      <dc:creator>Colin-Albert</dc:creator>
      <dc:date>2016-08-18T11:21:58Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Set analysis syntax</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-Set-analysis-syntax/m-p/1130110#M890275</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I started to put that together but then I noticed something really strange that I think is the culprit behind it all. It doesn't seem to be a set analysis problem after all.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have two fields - one called UniqueCountSupplierNumber and the other UniqueSupplierNumber. The first one is just an Autonumber of the latter one and created and stored as a field in the data model in just as many instances as the original one. However, when I do a count of the two, one show the full count and the other (the autonumber one) does a distinct count.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've tried some different things. First just looked at the data in a straight table and it seems to look fine.Then I tried to do some normal counts. If you look at the picture below (just a screencopy from the QV), the top left shows the raw data. Then I've added a normal count in the other charts with the only difference that I show a different amount of dimensions or different dimensions. All the counts should show 13, but when I only use the autonumber as the dimension, it does a distinct count of the autonumber one, but not of the original one.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This really boggles my mind. Any ideas???&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Tables.png" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/134919_Tables.png" style="width: 620px; height: 349px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Aug 2016 15:44:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-Set-analysis-syntax/m-p/1130110#M890275</guid>
      <dc:creator />
      <dc:date>2016-08-18T15:44:43Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Set analysis syntax</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-Set-analysis-syntax/m-p/1130111#M890276</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I found the error. It had to do with the count function (see link to post by &lt;A href="https://community.qlik.com/qlik-users/4003"&gt;hic&lt;/A&gt; below) . I was counting a key field (not wanting a distinct result) and then the count does not work (when you think of it, it is obvious, but I've never thought of it in the past). I don't know why it worked in the older file (it's a key field there as well), but at least I found the error. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And thanks for all the help and suggestions!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-blogpost/3734"&gt;Count or Count distinct?&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Aug 2016 08:16:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-Set-analysis-syntax/m-p/1130111#M890276</guid>
      <dc:creator />
      <dc:date>2016-08-19T08:16:23Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Set analysis syntax</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-Set-analysis-syntax/m-p/1130112#M890277</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The behaviour of Count() when a key field is used as argument has changed over the years. So, that it worked in some versions but not in others is not strange.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My view is that Count(&amp;lt;Key&amp;gt;) ought to always return NULL. It is just not well-defined.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Count(distinct &amp;gt;Key&amp;gt;) should however work, as well as Count(&amp;lt;CopyOfKey&amp;gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HIC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Aug 2016 08:26:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-Set-analysis-syntax/m-p/1130112#M890277</guid>
      <dc:creator>hic</dc:creator>
      <dc:date>2016-08-19T08:26:23Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Set analysis syntax</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-Set-analysis-syntax/m-p/1130113#M890278</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK, that explains it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And I can only agree with you regarding returning NULL - would have saved me two days work... I made a copy of the field and now it works as charm &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Aug 2016 08:32:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-Set-analysis-syntax/m-p/1130113#M890278</guid>
      <dc:creator />
      <dc:date>2016-08-19T08:32:03Z</dc:date>
    </item>
  </channel>
</rss>

