<?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 Distinct values in one field in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Distinct-values-in-one-field/m-p/144672#M23523</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Oh, I think I understand got what you want&lt;IMG alt="Idea" src="http://community.qlik.com/emoticons/emotion-55.gif" /&gt;:&lt;BR /&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&lt;BR /&gt;table_tmp:&lt;BR /&gt;LOAD&lt;BR /&gt; RowNo() as ID,&lt;BR /&gt; subfield(Field, ',') as SubField&lt;BR /&gt;FROM (Or RESIDENT)...;&lt;BR /&gt;//&lt;BR /&gt;Table:&lt;BR /&gt;LOAD&lt;BR /&gt; ID,&lt;BR /&gt; concat(&lt;STRONG&gt;distinct&lt;/STRONG&gt; SubField, ',')&lt;BR /&gt;RESIDENT table_tmp&lt;BR /&gt;GROUP BY ID;&lt;BR /&gt;DROP TABLE table_tmp;&lt;BR /&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 22 May 2009 07:53:32 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2009-05-22T07:53:32Z</dc:date>
    <item>
      <title>Distinct values in one field</title>
      <link>https://community.qlik.com/t5/QlikView/Distinct-values-in-one-field/m-p/144667#M23518</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear all&lt;/P&gt;&lt;P&gt;I have a rather odd requirement.&lt;/P&gt;&lt;P&gt;In a field i have several StaffId's and mailaddresses seperated by a comma. 55555,66666,77777 etc.&lt;/P&gt;&lt;P&gt;I need this field with distinct values, so the value only appears once for every record. I have used several hours trying with different ideas.&lt;/P&gt;&lt;P&gt;One idea was to split the field by using subfield(UserId,',') then load the distinct values and afterwards combine the values again using previous or peek. But i might be doing something wrong.&lt;/P&gt;&lt;P&gt;Is there any easy solution on this?&lt;/P&gt;&lt;P&gt;Thanks for any help&lt;/P&gt;&lt;P&gt;/Martin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 May 2009 15:49:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Distinct-values-in-one-field/m-p/144667#M23518</guid>
      <dc:creator />
      <dc:date>2009-05-21T15:49:02Z</dc:date>
    </item>
    <item>
      <title>Distinct values in one field</title>
      <link>https://community.qlik.com/t5/QlikView/Distinct-values-in-one-field/m-p/144668#M23519</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Martin,&lt;BR /&gt;If your method gives you the desired result, nothing is wrong with it. It sounds easy enough. I'd probably done something similar. Well, may not peek(), but left join or function exists(), but it's really is a matter of personal preference.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 May 2009 23:38:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Distinct-values-in-one-field/m-p/144668#M23519</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-05-21T23:38:54Z</dc:date>
    </item>
    <item>
      <title>Distinct values in one field</title>
      <link>https://community.qlik.com/t5/QlikView/Distinct-values-in-one-field/m-p/144669#M23520</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I made a little application using subfield ...&lt;/P&gt;&lt;P&gt;Is it something that helps or can you explain a little bit more your needs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Philippe&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 May 2009 23:58:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Distinct-values-in-one-field/m-p/144669#M23520</guid>
      <dc:creator />
      <dc:date>2009-05-21T23:58:30Z</dc:date>
    </item>
    <item>
      <title>Distinct values in one field</title>
      <link>https://community.qlik.com/t5/QlikView/Distinct-values-in-one-field/m-p/144670#M23521</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That is exactly my problem - i don't get what i want. Everytime i think i've nailed it, i found a value that should be there.&lt;/P&gt;&lt;P&gt;It is easy enough to split the field with subfield and load the distinct values, but i need to merge all the distinct values into one "field" seperated by a comma "," again.&lt;/P&gt;&lt;P&gt;Basically my first field 55555,66666,77777,88888,55555 is okay, but i need to remove the last "55555" as i only want one of each value.&lt;/P&gt;&lt;P&gt;Any ideas?&lt;/P&gt;&lt;P&gt;/Martin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 May 2009 01:43:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Distinct-values-in-one-field/m-p/144670#M23521</guid>
      <dc:creator />
      <dc:date>2009-05-22T01:43:41Z</dc:date>
    </item>
    <item>
      <title>Distinct values in one field</title>
      <link>https://community.qlik.com/t5/QlikView/Distinct-values-in-one-field/m-p/144671#M23522</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Martin,&lt;/P&gt;&lt;P&gt;I'm not 100% certain that I understood what you're going for here but something along the lines of this ought to work:&lt;/P&gt;&lt;P&gt;T1:&lt;BR /&gt;LOAD * INLINE [&lt;BR /&gt; F1, F2&lt;BR /&gt; "55555,66666,77777,88888,55555", 1&lt;BR /&gt; "88888,44444,33333,22222,44444", 2&lt;BR /&gt;];&lt;/P&gt;&lt;P&gt;T2:&lt;BR /&gt;Load distinct&lt;BR /&gt; subfield(F1,',') as Test,&lt;BR /&gt; F2&lt;BR /&gt;resident T1;&lt;/P&gt;&lt;P&gt;T3:&lt;BR /&gt;load&lt;BR /&gt; concat(Test,',') as Test2,&lt;BR /&gt; F2&lt;BR /&gt;resident T2&lt;BR /&gt;group by F2;&lt;/P&gt;&lt;P&gt;drop table T2;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//Jsn&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 May 2009 03:04:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Distinct-values-in-one-field/m-p/144671#M23522</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-05-22T03:04:49Z</dc:date>
    </item>
    <item>
      <title>Distinct values in one field</title>
      <link>https://community.qlik.com/t5/QlikView/Distinct-values-in-one-field/m-p/144672#M23523</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Oh, I think I understand got what you want&lt;IMG alt="Idea" src="http://community.qlik.com/emoticons/emotion-55.gif" /&gt;:&lt;BR /&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&lt;BR /&gt;table_tmp:&lt;BR /&gt;LOAD&lt;BR /&gt; RowNo() as ID,&lt;BR /&gt; subfield(Field, ',') as SubField&lt;BR /&gt;FROM (Or RESIDENT)...;&lt;BR /&gt;//&lt;BR /&gt;Table:&lt;BR /&gt;LOAD&lt;BR /&gt; ID,&lt;BR /&gt; concat(&lt;STRONG&gt;distinct&lt;/STRONG&gt; SubField, ',')&lt;BR /&gt;RESIDENT table_tmp&lt;BR /&gt;GROUP BY ID;&lt;BR /&gt;DROP TABLE table_tmp;&lt;BR /&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 May 2009 07:53:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Distinct-values-in-one-field/m-p/144672#M23523</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-05-22T07:53:32Z</dc:date>
    </item>
    <item>
      <title>Distinct values in one field</title>
      <link>https://community.qlik.com/t5/QlikView/Distinct-values-in-one-field/m-p/144673#M23524</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Michael,&lt;/P&gt;&lt;P&gt;Was that really it? I couldn't find the "reverse subfield function" like Concat, therefore I started out with peek, previous etc.&lt;/P&gt;&lt;P&gt;Thank you very much. I have this report generator and i want to make it a bit safer to use. We split the field "User" within an macro, and selecting those who should receive the specific report (an extract from our AD).&lt;/P&gt;&lt;P&gt;The only issue was if a userid was entered twice in the - then the user will both be selected and deselected.&lt;/P&gt;&lt;P&gt;/Martin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 May 2009 12:52:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Distinct-values-in-one-field/m-p/144673#M23524</guid>
      <dc:creator />
      <dc:date>2009-05-22T12:52:51Z</dc:date>
    </item>
  </channel>
</rss>

