<?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 AW:Subfieldcount function in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Subfieldcount-function/m-p/174560#M43340</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You could make to separate loads. The first on reads the field until comma as CUS, the second reads erverything after the comma.&lt;/P&gt;&lt;P&gt;- Ralf&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 03 Dec 2009 21:35:39 GMT</pubDate>
    <dc:creator>rbecher</dc:creator>
    <dc:date>2009-12-03T21:35:39Z</dc:date>
    <item>
      <title>Subfieldcount function</title>
      <link>https://community.qlik.com/t5/QlikView/Subfieldcount-function/m-p/174559#M43339</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In Qlikview you can use the subfield() function to subdivide a field based on a delimiter. I have a field in the database which contains a customer and supplier number. These need to be stored as each time 2 records, but with an indication of the type. Is it possible to test on the iteration when using the subfield function (without using a for next loop and inter record functions ?&lt;/P&gt;&lt;P&gt;Example :&lt;/P&gt;&lt;P&gt;Database field custsup (1 field delimited by a ','):&lt;/P&gt;&lt;P&gt;A, B&lt;/P&gt;&lt;P&gt;C, D&lt;/P&gt;&lt;P&gt;This needs to be transformed into a table containing 2 fields :&lt;/P&gt;&lt;P&gt;A CUS&lt;/P&gt;&lt;P&gt;B SUP&lt;/P&gt;&lt;P&gt;C CUS&lt;/P&gt;&lt;P&gt;D SUP&lt;/P&gt;&lt;P&gt;The first subfield iteration needs to have CUS in the second field, the 2nd SUP, etc...&lt;/P&gt;&lt;P&gt;Is this possible without creating a loop ?&lt;/P&gt;&lt;P&gt;I was thinking of something like : if(subfieldcount(custsup) = 1 then 'CUS' else 'SUP' end) or something like that. Unfortunately, the subfieldcount function does not exist.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Dec 2009 21:24:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Subfieldcount-function/m-p/174559#M43339</guid>
      <dc:creator />
      <dc:date>2009-12-03T21:24:25Z</dc:date>
    </item>
    <item>
      <title>AW:Subfieldcount function</title>
      <link>https://community.qlik.com/t5/QlikView/Subfieldcount-function/m-p/174560#M43340</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You could make to separate loads. The first on reads the field until comma as CUS, the second reads erverything after the comma.&lt;/P&gt;&lt;P&gt;- Ralf&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Dec 2009 21:35:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Subfieldcount-function/m-p/174560#M43340</guid>
      <dc:creator>rbecher</dc:creator>
      <dc:date>2009-12-03T21:35:39Z</dc:date>
    </item>
    <item>
      <title>Subfieldcount function</title>
      <link>https://community.qlik.com/t5/QlikView/Subfieldcount-function/m-p/174561#M43341</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Subfield without any parameters works great in this situations.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See the example here http://community.qlik.com/cfs-filesystemfile.ashx/__key/CommunityServer.Components.UserFiles/00.00.00.40.74/subfield.qvw.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Dec 2009 21:37:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Subfieldcount-function/m-p/174561#M43341</guid>
      <dc:creator>danielrozental</dc:creator>
      <dc:date>2009-12-03T21:37:12Z</dc:date>
    </item>
    <item>
      <title>AW:Subfieldcount function</title>
      <link>https://community.qlik.com/t5/QlikView/Subfieldcount-function/m-p/174562#M43342</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Another way is to mark the data after the comma and make a stacked load:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;LOAD if(left(marked_field, 1)='#', mid(marked_field, 1) marked_field) as value&lt;BR /&gt;, if(left(marked_field, 1)='#', 'SUP', 'CUS') as type;&lt;BR /&gt;LOAD subfield(replace(field, ', ', ',#'), ',') as marked_field from ...;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Dec 2009 21:43:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Subfieldcount-function/m-p/174562#M43342</guid>
      <dc:creator>rbecher</dc:creator>
      <dc:date>2009-12-03T21:43:37Z</dc:date>
    </item>
    <item>
      <title>Subfieldcount function</title>
      <link>https://community.qlik.com/t5/QlikView/Subfieldcount-function/m-p/174563#M43343</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;Ralf's answer is right, here you are the possible solution.&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Dec 2009 21:44:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Subfieldcount-function/m-p/174563#M43343</guid>
      <dc:creator />
      <dc:date>2009-12-03T21:44:11Z</dc:date>
    </item>
    <item>
      <title>AW:Re: Subfieldcount function</title>
      <link>https://community.qlik.com/t5/QlikView/Subfieldcount-function/m-p/174564#M43344</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Daniel, this could be very dangerous if there is one field without a comma &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Dec 2009 21:47:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Subfieldcount-function/m-p/174564#M43344</guid>
      <dc:creator>rbecher</dc:creator>
      <dc:date>2009-12-03T21:47:12Z</dc:date>
    </item>
    <item>
      <title>AW:Re: Subfieldcount function</title>
      <link>https://community.qlik.com/t5/QlikView/Subfieldcount-function/m-p/174565#M43345</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I know, but it's a very interesting use of the subfield function and you only do 1 load.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Dec 2009 21:49:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Subfieldcount-function/m-p/174565#M43345</guid>
      <dc:creator>danielrozental</dc:creator>
      <dc:date>2009-12-03T21:49:31Z</dc:date>
    </item>
  </channel>
</rss>

