<?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: How to take multiple values from one field into many rows in Connectivity &amp; Data Prep</title>
    <link>https://community.qlik.com/t5/Connectivity-Data-Prep/How-to-take-multiple-values-from-one-field-into-many-rows/m-p/1916540#M10529</link>
    <description>&lt;P&gt;That's even easier. Didn't know the 3rd parameter was optional. Qlik never ceases to amaze me!&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Sat, 09 Apr 2022 10:39:32 GMT</pubDate>
    <dc:creator>anthonyj</dc:creator>
    <dc:date>2022-04-09T10:39:32Z</dc:date>
    <item>
      <title>How to take multiple values from one field into many rows</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/How-to-take-multiple-values-from-one-field-into-many-rows/m-p/1916038#M10524</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a table with tracking numbers similar to the following. If an order num has multiple tracking numbers, the tracking numbers are separated by &amp;lt;BR&amp;gt; in the data, but I need each tracking number to have it's own row&lt;/P&gt;
&lt;P&gt;Current Table:&lt;/P&gt;
&lt;P&gt;Order Num, Tracking Num&lt;BR /&gt;1234, 556644&lt;BR /&gt;2345, 112233&amp;lt;BR&amp;gt;445566&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;Desired Table:&lt;BR /&gt;&lt;BR /&gt;Order Num, Tracking Num&lt;BR /&gt;1234, 556644&lt;BR /&gt;2345, 112233&lt;BR /&gt;2345, 445566&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any thoughts?&lt;/P&gt;</description>
      <pubDate>Thu, 07 Apr 2022 20:12:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/How-to-take-multiple-values-from-one-field-into-many-rows/m-p/1916038#M10524</guid>
      <dc:creator>CaseyLassiter</dc:creator>
      <dc:date>2022-04-07T20:12:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to take multiple values from one field into many rows</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/How-to-take-multiple-values-from-one-field-into-many-rows/m-p/1916092#M10525</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/157246"&gt;@CaseyLassiter&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;It sounds like there's an indeterminate amount of &amp;lt;BR&amp;gt; values in the column so I have written a loop based on the maximum number of sections in the column.&amp;nbsp; It sounds like the original data was in an HTML format:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;data:&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;load &lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;[Order Num],&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;[Tracking Num],&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;// Find the rows containing breaks&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;SubStringCount([Tracking Num],'&amp;lt;BR&amp;gt;')+1 as BreakCount&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;load * Inline&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;[&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;Order Num, Tracking Num&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;1234, 556644&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;1235, 532345&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;2345, 112233&amp;lt;BR&amp;gt;445566&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;3245, 135905&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;5123, 335555&amp;lt;BR&amp;gt;909090&amp;lt;BR&amp;gt;539234&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;3362, 333111&amp;lt;BR&amp;gt;912356&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;];&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;STRONG&gt;//******************************&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;// Find the maximum number of breaks in the columns&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;// To be used in the loop&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;MaxBreak:&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;load &lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;max(counter) as MaxBreaks;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;Load&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;fieldvalue('BreakCount', recno()) as counter&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;AutoGenerate fieldvaluecount('BreakCount');&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;let vMaxBreaks = peek('MaxBreaks',0,'MaxBreak');&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;//******************************&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;STRONG&gt;// Loop through your data from 1 to the number of sections in the column&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;// splitting them up using subfield&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;for i = 1 to vMaxBreaks&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;trace &lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;****************&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;$(i)&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;$(vMaxBreaks)&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;******************;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Tracking:&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;Load&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;[Order Num],&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;SubField([Tracking Num],'&amp;lt;BR&amp;gt;',$(i)) as [Tracking Num]&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;Resident data&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;where not isnull(SubField([Tracking Num],'&amp;lt;BR&amp;gt;',$(i)));&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;next i;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;// Drop unrequired tables&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;drop table data, MaxBreak;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;// clean up the variables&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;let vMaxBreaks=;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;let i=;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;I hope this helps with your requirement.&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;P&gt;Anthony&lt;/P&gt;</description>
      <pubDate>Fri, 08 Apr 2022 01:47:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/How-to-take-multiple-values-from-one-field-into-many-rows/m-p/1916092#M10525</guid>
      <dc:creator>anthonyj</dc:creator>
      <dc:date>2022-04-08T01:47:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to take multiple values from one field into many rows</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/How-to-take-multiple-values-from-one-field-into-many-rows/m-p/1916122#M10526</link>
      <description>&lt;P&gt;Look at the &lt;STRONG&gt;subfield()&lt;/STRONG&gt; for easier solution.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Apr 2022 06:26:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/How-to-take-multiple-values-from-one-field-into-many-rows/m-p/1916122#M10526</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2022-04-08T06:26:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to take multiple values from one field into many rows</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/How-to-take-multiple-values-from-one-field-into-many-rows/m-p/1916128#M10527</link>
      <description>&lt;P&gt;load&amp;nbsp; [Order Num],subfield([ Tracking Num],'&amp;lt;BR&amp;gt;') as [ Tracking Num];&lt;/P&gt;
&lt;P&gt;load * inline [&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Order Num, Tracking Num&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1234, 556644&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2345, 112233&amp;lt;BR&amp;gt;445566&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;];&lt;/P&gt;</description>
      <pubDate>Fri, 08 Apr 2022 06:41:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/How-to-take-multiple-values-from-one-field-into-many-rows/m-p/1916128#M10527</guid>
      <dc:creator>anat</dc:creator>
      <dc:date>2022-04-08T06:41:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to take multiple values from one field into many rows</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/How-to-take-multiple-values-from-one-field-into-many-rows/m-p/1916540#M10529</link>
      <description>&lt;P&gt;That's even easier. Didn't know the 3rd parameter was optional. Qlik never ceases to amaze me!&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Sat, 09 Apr 2022 10:39:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/How-to-take-multiple-values-from-one-field-into-many-rows/m-p/1916540#M10529</guid>
      <dc:creator>anthonyj</dc:creator>
      <dc:date>2022-04-09T10:39:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to take multiple values from one field into many rows</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/How-to-take-multiple-values-from-one-field-into-many-rows/m-p/1916590#M10530</link>
      <description>&lt;P&gt;Yes, 3rd parameter optional.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://help.qlik.com/en-US/qlikview/May2021/Subsystems/Client/Content/QV_QlikView/Scripting/StringFunctions/SubField.htm" target="_blank"&gt;https://help.qlik.com/en-US/qlikview/May2021/Subsystems/Client/Content/QV_QlikView/Scripting/StringFunctions/SubField.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 10 Apr 2022 08:49:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/How-to-take-multiple-values-from-one-field-into-many-rows/m-p/1916590#M10530</guid>
      <dc:creator>anat</dc:creator>
      <dc:date>2022-04-10T08:49:27Z</dc:date>
    </item>
  </channel>
</rss>

