<?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: Set Analysis: Get distinct values in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Get-distinct-values/m-p/581418#M1104336</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Pramod,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;both ways are possible.&lt;/P&gt;&lt;P&gt;I would suggest using an IF_statement, just because set_analysis is tricky. That would look sth. like this&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt;&amp;gt; = IF((type = 'store' and [zipcode] = '12345'), [your_colour]) &amp;lt;&amp;lt;&amp;lt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or, maybe even simpler,&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt;&amp;gt; = IF(type = 'store',&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PICK(MATCH([zipcode], [code1], [code2]), [colour1], [colour2])) &amp;lt;&amp;lt;&amp;lt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=&amp;gt; That way, the type will be queried first and the inner query will only ever be executed for those codes of type 'store' to begin with - that might be more efficient resource-wise.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HTH&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DataNibbler&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 31 Mar 2014 14:30:12 GMT</pubDate>
    <dc:creator>datanibbler</dc:creator>
    <dc:date>2014-03-31T14:30:12Z</dc:date>
    <item>
      <title>Set Analysis: Get distinct values</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Get-distinct-values/m-p/581415#M1104333</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am held up with the below problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have (say) 20 zipcodes, of which 8 zipcodes(4 distinct) are of 'Type'=Store and others are of type 'Sales'. I wish to get the all the values of type 'store' in a variable and assign to each of them with with a color code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How do i achieve it? Should I use if statement or Set Analysis?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Pramod K&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Mar 2014 14:17:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Get-distinct-values/m-p/581415#M1104333</guid>
      <dc:creator />
      <dc:date>2014-03-31T14:17:54Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis: Get distinct values</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Get-distinct-values/m-p/581416#M1104334</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can put this expression in a variable: =concat({&amp;lt;Type={store}&amp;gt;}distinct zipcode, ',' )&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Mar 2014 14:24:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Get-distinct-values/m-p/581416#M1104334</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2014-03-31T14:24:22Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis: Get distinct values</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Get-distinct-values/m-p/581417#M1104335</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Where exactly you want to use this color?&lt;/P&gt;&lt;P&gt;I.e. Straight Table or in any other object?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Mar 2014 14:24:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Get-distinct-values/m-p/581417#M1104335</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2014-03-31T14:24:45Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis: Get distinct values</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Get-distinct-values/m-p/581418#M1104336</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Pramod,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;both ways are possible.&lt;/P&gt;&lt;P&gt;I would suggest using an IF_statement, just because set_analysis is tricky. That would look sth. like this&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt;&amp;gt; = IF((type = 'store' and [zipcode] = '12345'), [your_colour]) &amp;lt;&amp;lt;&amp;lt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or, maybe even simpler,&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt;&amp;gt; = IF(type = 'store',&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PICK(MATCH([zipcode], [code1], [code2]), [colour1], [colour2])) &amp;lt;&amp;lt;&amp;lt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=&amp;gt; That way, the type will be queried first and the inner query will only ever be executed for those codes of type 'store' to begin with - that might be more efficient resource-wise.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HTH&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DataNibbler&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Mar 2014 14:30:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Get-distinct-values/m-p/581418#M1104336</guid>
      <dc:creator>datanibbler</dc:creator>
      <dc:date>2014-03-31T14:30:12Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis: Get distinct values</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Get-distinct-values/m-p/581419#M1104337</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I will be using these color codes in the Color expression on Qlikmap..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Mar 2014 16:27:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Get-distinct-values/m-p/581419#M1104337</guid>
      <dc:creator />
      <dc:date>2014-03-31T16:27:27Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis: Get distinct values</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Get-distinct-values/m-p/581420#M1104338</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you very much.. it worked &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Mar 2014 16:40:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Get-distinct-values/m-p/581420#M1104338</guid>
      <dc:creator />
      <dc:date>2014-03-31T16:40:35Z</dc:date>
    </item>
  </channel>
</rss>

