<?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 CONCAT distinct picking too many values in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/CONCAT-distinct-picking-too-many-values/m-p/63963#M10645</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 the following expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=CONCAT({1&amp;lt; Month=, VirtualProduct=P(Product_code)&amp;gt;}DISTINCT &lt;STRONG&gt;VirtualProduct&lt;/STRONG&gt; &amp;amp; ', - ' &amp;amp; &lt;STRONG&gt;VirtualMonth&lt;/STRONG&gt; &amp;amp;&amp;nbsp; ' - ' &amp;amp; If(&lt;STRONG&gt;Flag_Bloquear&lt;/STRONG&gt;,',,-1,,-1,,-1,,-1',&lt;STRONG&gt;Locking_code&lt;/STRONG&gt;)&amp;amp; CHR(10))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The purpose is to get a list of 12 months per product, and a code that is unique per month and will depend on the flag Flag_Bloquear.&lt;/P&gt;&lt;P&gt;The field "Locking_code" has two possible values: ',,-1,,-1,,0,,0' and ',,0,,0,,-1,,-1' and it will pick one or another depending on the selections in one field, also with two possible values that is in the same table. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This said, the list should be something like:&lt;/P&gt;&lt;P&gt;Product1, 01, ',,-1,,-1,,-1,,-1'&lt;/P&gt;&lt;P&gt;Product1, 02, ',,-1,,-1,,0,,0'&lt;/P&gt;&lt;P&gt;Product1, 03, ',,0,,0,,-1,,-1' and so forth until month 12, and then next product.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However,&amp;nbsp; I am getting &lt;SPAN style="text-decoration: underline;"&gt;three values per month and product&lt;/SPAN&gt;. Each of the lines belongs to all the possible conditions handled in the If statement. See below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;90110323, - 1 - ,,-1,,-1,,-1,,-1&lt;/P&gt;&lt;P&gt;90110323, - 1 - ,,-1,,-1,,0,,0&lt;/P&gt;&lt;P&gt;90110323, - 1 - ,,0,,0,,-1,,-1&lt;/P&gt;&lt;P&gt;90110323, - 10 - ,,-1,,-1,,-1,,-1&lt;/P&gt;&lt;P&gt;90110323, - 10 - ,,-1,,-1,,0,,0&lt;/P&gt;&lt;P&gt;90110323, - 10 - ,,0,,0,,-1,,-1&lt;/P&gt;&lt;P&gt;90110323, - 11 - ,,-1,,-1,,-1,,-1&lt;/P&gt;&lt;P&gt;90110323, - 11 - ,,-1,,-1,,0,,0&lt;/P&gt;&lt;P&gt;90110323, - 11 - ,,0,,0,,-1,,-1&lt;/P&gt;&lt;P&gt;90110323, - 12 - ,,-1,,-1,,-1,,-1&lt;/P&gt;&lt;P&gt;90110323, - 12 - ,,-1,,-1,,0,,0&lt;/P&gt;&lt;P&gt;90110323, - 12 - ,,0,,0,,-1,,-1&lt;/P&gt;&lt;P&gt;90110323, - 2 - ,,-1,,-1,,-1,,-1&lt;/P&gt;&lt;P&gt;90110323, - 2 - ,,-1,,-1,,0,,0&lt;/P&gt;&lt;P&gt;90110323, - 2 - ,,0,,0,,-1,,-1&lt;/P&gt;&lt;P&gt;90110323, - 3 - ,,-1,,-1,,-1,,-1&lt;/P&gt;&lt;P&gt;90110323, - 3 - ,,-1,,-1,,0,,0&lt;/P&gt;&lt;P&gt;90110323, - 3 - ,,0,,0,,-1,,-1&lt;/P&gt;&lt;P&gt;90110323, - 4 - ,,-1,,-1,,-1,,-1&lt;/P&gt;&lt;P&gt;90110323, - 4 - ,,-1,,-1,,0,,0&lt;/P&gt;&lt;P&gt;90110323, - 4 - ,,0,,0,,-1,,-1&lt;/P&gt;&lt;P&gt;90110323, - 5 - ,,-1,,-1,,-1,,-1&lt;/P&gt;&lt;P&gt;90110323, - 5 - ,,-1,,-1,,0,,0&lt;/P&gt;&lt;P&gt;90110323, - 5 - ,,0,,0,,-1,,-1&lt;/P&gt;&lt;P&gt;90110323, - 6 - ,,-1,,-1,,-1,,-1&lt;/P&gt;&lt;P&gt;90110323, - 6 - ,,-1,,-1,,0,,0&lt;/P&gt;&lt;P&gt;90110323, - 6 - ,,0,,0,,-1,,-1&lt;/P&gt;&lt;P&gt;90110323, - 7 - ,,-1,,-1,,-1,,-1&lt;/P&gt;&lt;P&gt;90110323, - 7 - ,,-1,,-1,,0,,0&lt;/P&gt;&lt;P&gt;90110323, - 7 - ,,0,,0,,-1,,-1&lt;/P&gt;&lt;P&gt;90110323, - 8 - ,,-1,,-1,,-1,,-1&lt;/P&gt;&lt;P&gt;90110323, - 8 - ,,-1,,-1,,0,,0&lt;/P&gt;&lt;P&gt;90110323, - 8 - ,,0,,0,,-1,,-1&lt;/P&gt;&lt;P&gt;90110323, - 9 - ,,-1,,-1,,-1,,-1&lt;/P&gt;&lt;P&gt;90110323, - 9 - ,,-1,,-1,,0,,0&lt;/P&gt;&lt;P&gt;90110323, - 9 - ,,0,,0,,-1,,-1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;VirtualProducts: Is the only field in a data island.&lt;/LI&gt;&lt;LI&gt;VirtualMonth is in a different table (VirtualMonths)&lt;/LI&gt;&lt;LI&gt;Flag_Bloquear has two values, 0 and 1 and is in the same table as VirtualMonth&lt;/LI&gt;&lt;LI&gt;product_code: is in the fact table, which is linked to VirtualMonths via Month&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a way to achieve this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Joaquin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 07 May 2018 14:12:42 GMT</pubDate>
    <dc:creator>j_nlucas</dc:creator>
    <dc:date>2018-05-07T14:12:42Z</dc:date>
    <item>
      <title>CONCAT distinct picking too many values</title>
      <link>https://community.qlik.com/t5/QlikView/CONCAT-distinct-picking-too-many-values/m-p/63963#M10645</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 the following expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=CONCAT({1&amp;lt; Month=, VirtualProduct=P(Product_code)&amp;gt;}DISTINCT &lt;STRONG&gt;VirtualProduct&lt;/STRONG&gt; &amp;amp; ', - ' &amp;amp; &lt;STRONG&gt;VirtualMonth&lt;/STRONG&gt; &amp;amp;&amp;nbsp; ' - ' &amp;amp; If(&lt;STRONG&gt;Flag_Bloquear&lt;/STRONG&gt;,',,-1,,-1,,-1,,-1',&lt;STRONG&gt;Locking_code&lt;/STRONG&gt;)&amp;amp; CHR(10))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The purpose is to get a list of 12 months per product, and a code that is unique per month and will depend on the flag Flag_Bloquear.&lt;/P&gt;&lt;P&gt;The field "Locking_code" has two possible values: ',,-1,,-1,,0,,0' and ',,0,,0,,-1,,-1' and it will pick one or another depending on the selections in one field, also with two possible values that is in the same table. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This said, the list should be something like:&lt;/P&gt;&lt;P&gt;Product1, 01, ',,-1,,-1,,-1,,-1'&lt;/P&gt;&lt;P&gt;Product1, 02, ',,-1,,-1,,0,,0'&lt;/P&gt;&lt;P&gt;Product1, 03, ',,0,,0,,-1,,-1' and so forth until month 12, and then next product.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However,&amp;nbsp; I am getting &lt;SPAN style="text-decoration: underline;"&gt;three values per month and product&lt;/SPAN&gt;. Each of the lines belongs to all the possible conditions handled in the If statement. See below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;90110323, - 1 - ,,-1,,-1,,-1,,-1&lt;/P&gt;&lt;P&gt;90110323, - 1 - ,,-1,,-1,,0,,0&lt;/P&gt;&lt;P&gt;90110323, - 1 - ,,0,,0,,-1,,-1&lt;/P&gt;&lt;P&gt;90110323, - 10 - ,,-1,,-1,,-1,,-1&lt;/P&gt;&lt;P&gt;90110323, - 10 - ,,-1,,-1,,0,,0&lt;/P&gt;&lt;P&gt;90110323, - 10 - ,,0,,0,,-1,,-1&lt;/P&gt;&lt;P&gt;90110323, - 11 - ,,-1,,-1,,-1,,-1&lt;/P&gt;&lt;P&gt;90110323, - 11 - ,,-1,,-1,,0,,0&lt;/P&gt;&lt;P&gt;90110323, - 11 - ,,0,,0,,-1,,-1&lt;/P&gt;&lt;P&gt;90110323, - 12 - ,,-1,,-1,,-1,,-1&lt;/P&gt;&lt;P&gt;90110323, - 12 - ,,-1,,-1,,0,,0&lt;/P&gt;&lt;P&gt;90110323, - 12 - ,,0,,0,,-1,,-1&lt;/P&gt;&lt;P&gt;90110323, - 2 - ,,-1,,-1,,-1,,-1&lt;/P&gt;&lt;P&gt;90110323, - 2 - ,,-1,,-1,,0,,0&lt;/P&gt;&lt;P&gt;90110323, - 2 - ,,0,,0,,-1,,-1&lt;/P&gt;&lt;P&gt;90110323, - 3 - ,,-1,,-1,,-1,,-1&lt;/P&gt;&lt;P&gt;90110323, - 3 - ,,-1,,-1,,0,,0&lt;/P&gt;&lt;P&gt;90110323, - 3 - ,,0,,0,,-1,,-1&lt;/P&gt;&lt;P&gt;90110323, - 4 - ,,-1,,-1,,-1,,-1&lt;/P&gt;&lt;P&gt;90110323, - 4 - ,,-1,,-1,,0,,0&lt;/P&gt;&lt;P&gt;90110323, - 4 - ,,0,,0,,-1,,-1&lt;/P&gt;&lt;P&gt;90110323, - 5 - ,,-1,,-1,,-1,,-1&lt;/P&gt;&lt;P&gt;90110323, - 5 - ,,-1,,-1,,0,,0&lt;/P&gt;&lt;P&gt;90110323, - 5 - ,,0,,0,,-1,,-1&lt;/P&gt;&lt;P&gt;90110323, - 6 - ,,-1,,-1,,-1,,-1&lt;/P&gt;&lt;P&gt;90110323, - 6 - ,,-1,,-1,,0,,0&lt;/P&gt;&lt;P&gt;90110323, - 6 - ,,0,,0,,-1,,-1&lt;/P&gt;&lt;P&gt;90110323, - 7 - ,,-1,,-1,,-1,,-1&lt;/P&gt;&lt;P&gt;90110323, - 7 - ,,-1,,-1,,0,,0&lt;/P&gt;&lt;P&gt;90110323, - 7 - ,,0,,0,,-1,,-1&lt;/P&gt;&lt;P&gt;90110323, - 8 - ,,-1,,-1,,-1,,-1&lt;/P&gt;&lt;P&gt;90110323, - 8 - ,,-1,,-1,,0,,0&lt;/P&gt;&lt;P&gt;90110323, - 8 - ,,0,,0,,-1,,-1&lt;/P&gt;&lt;P&gt;90110323, - 9 - ,,-1,,-1,,-1,,-1&lt;/P&gt;&lt;P&gt;90110323, - 9 - ,,-1,,-1,,0,,0&lt;/P&gt;&lt;P&gt;90110323, - 9 - ,,0,,0,,-1,,-1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;VirtualProducts: Is the only field in a data island.&lt;/LI&gt;&lt;LI&gt;VirtualMonth is in a different table (VirtualMonths)&lt;/LI&gt;&lt;LI&gt;Flag_Bloquear has two values, 0 and 1 and is in the same table as VirtualMonth&lt;/LI&gt;&lt;LI&gt;product_code: is in the fact table, which is linked to VirtualMonths via Month&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a way to achieve this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Joaquin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 May 2018 14:12:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/CONCAT-distinct-picking-too-many-values/m-p/63963#M10645</guid>
      <dc:creator>j_nlucas</dc:creator>
      <dc:date>2018-05-07T14:12:42Z</dc:date>
    </item>
    <item>
      <title>Re: CONCAT distinct picking too many values</title>
      <link>https://community.qlik.com/t5/QlikView/CONCAT-distinct-picking-too-many-values/m-p/63964#M10646</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Where exactly are you using this Concat function? In a straight table or pivot table or in a text box object?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 May 2018 14:24:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/CONCAT-distinct-picking-too-many-values/m-p/63964#M10646</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-05-07T14:24:44Z</dc:date>
    </item>
  </channel>
</rss>

