<?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: Separate transaction rows for bundled products in Connectivity &amp; Data Prep</title>
    <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Separate-transaction-rows-for-bundled-products/m-p/1801247#M8820</link>
    <description>&lt;P&gt;Hi Marcus,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks so much for your reply!&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am getting a load error. I think it has something to do with the concatenation in the mapping load?&lt;/P&gt;&lt;P&gt;--&amp;gt;If i change the&amp;nbsp;'concat(ComponentSKU &amp;amp; '|' &amp;amp; Quantity, chr(1))' to 'ComponentSKU&amp;amp;'|'&amp;amp;Quantity&amp;amp;chr(1)' it does'nt give me any errors (but that doesn't give me the proper table).&amp;nbsp;&lt;/P&gt;&lt;P&gt;You wouldn't have any further suggestions? I've added the script form Qlik Sense .&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Much appreciated if you could help me out!&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;Thomas&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;[TRANSACTIONS]:&lt;BR /&gt;LOAD * INLINE [&lt;BR /&gt;Date, Product, Qty&lt;BR /&gt;1 Jan 2017, A, 10&lt;BR /&gt;2 Jan 2017, Bundle X, 5&lt;BR /&gt;3 Jan 2017, B, 10&lt;BR /&gt;4 Jan 2017, Bundle Y, 5];&lt;/P&gt;&lt;P&gt;[BUNDLES]:&lt;BR /&gt;LOAD * INLINE [&lt;BR /&gt;ParentSKU, ComponentSKU, Quantity&lt;BR /&gt;Bundle X, A, 3&lt;BR /&gt;Bundle X, B, 5&lt;BR /&gt;Bundle X, C, 10&lt;BR /&gt;Bundle Y, P, 5&lt;BR /&gt;Bundle Y, Q, 7&lt;BR /&gt;Bundle Y, R, 12&lt;BR /&gt;Bundle Y, S, 3];&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;[m]:&lt;BR /&gt;MAPPING LOAD ParentSKU, &lt;FONT color="#FF0000"&gt;ComponentSKU&amp;amp;'|'&amp;amp;Quantity&amp;amp;chr(1&lt;/FONT&gt;) as m&lt;BR /&gt;RESIDENT BUNDLES;&lt;/P&gt;&lt;P&gt;[t]:&lt;BR /&gt;load *, Qty * Qty2 as Qty3; // any further transformations&lt;BR /&gt;load *, subfield(Product2, '|', 1) as Product3, subfield(Product2, '|', 2) as Qty2;&lt;BR /&gt;load *, subfield(Product, chr(1)) as Product2;&lt;BR /&gt;load Date, Product, applymap('m', Product, Product) as Product1, Qty&lt;BR /&gt;Resident Transactions;&lt;/P&gt;</description>
    <pubDate>Wed, 21 Apr 2021 10:19:41 GMT</pubDate>
    <dc:creator>ThomasS</dc:creator>
    <dc:date>2021-04-21T10:19:41Z</dc:date>
    <item>
      <title>Separate transaction rows for bundled products</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Separate-transaction-rows-for-bundled-products/m-p/1800306#M8799</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have a dataset where a bundled product (consists of more than one sub component) has to be split up in different rows of data because they are subject to different VAT-rates. I have found a similar case that handles this issue with a Python script, but I was hoping that this could also be achieved in the load script of Qlik Sense?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://stackoverflow.com/questions/50251408/separate-transaction-rows-of-bundled-products-into-multiple-rows-of-individual-p" target="_blank" rel="noopener"&gt;https://stackoverflow.com/questions/50251408/separate-transaction-rows-of-bundled-products-into-multiple-rows-of-individual-p&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance for the help!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 18 Apr 2021 10:04:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/Separate-transaction-rows-for-bundled-products/m-p/1800306#M8799</guid>
      <dc:creator>ThomasS</dc:creator>
      <dc:date>2021-04-18T10:04:27Z</dc:date>
    </item>
    <item>
      <title>Re: Separate transaction rows for bundled products</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Separate-transaction-rows-for-bundled-products/m-p/1800415#M8803</link>
      <description>&lt;P&gt;Of course there are script-solutions in Qlik possible. One might be:&lt;/P&gt;&lt;P&gt;m: mapping load ParentSKU, concat(ComponentSKU &amp;amp; '|' &amp;amp; Quantity, chr(1)) from Bundles;&lt;/P&gt;&lt;P&gt;t:&lt;BR /&gt;load *, Qty * Qty2 as Qty3; // any further transformations&lt;BR /&gt;load *, subfield(Product2, '|', 1) as Product3, subfield(Product2, '|', 2) as Qty2;&lt;BR /&gt;load *, subfield(Product, chr(1)) as Product2;&lt;BR /&gt;load Date, Product, applymap('m', Product, Product) as Product1, Qty from Transactions;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;</description>
      <pubDate>Mon, 19 Apr 2021 08:55:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/Separate-transaction-rows-for-bundled-products/m-p/1800415#M8803</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2021-04-19T08:55:26Z</dc:date>
    </item>
    <item>
      <title>Re: Separate transaction rows for bundled products</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Separate-transaction-rows-for-bundled-products/m-p/1801247#M8820</link>
      <description>&lt;P&gt;Hi Marcus,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks so much for your reply!&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am getting a load error. I think it has something to do with the concatenation in the mapping load?&lt;/P&gt;&lt;P&gt;--&amp;gt;If i change the&amp;nbsp;'concat(ComponentSKU &amp;amp; '|' &amp;amp; Quantity, chr(1))' to 'ComponentSKU&amp;amp;'|'&amp;amp;Quantity&amp;amp;chr(1)' it does'nt give me any errors (but that doesn't give me the proper table).&amp;nbsp;&lt;/P&gt;&lt;P&gt;You wouldn't have any further suggestions? I've added the script form Qlik Sense .&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Much appreciated if you could help me out!&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;Thomas&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;[TRANSACTIONS]:&lt;BR /&gt;LOAD * INLINE [&lt;BR /&gt;Date, Product, Qty&lt;BR /&gt;1 Jan 2017, A, 10&lt;BR /&gt;2 Jan 2017, Bundle X, 5&lt;BR /&gt;3 Jan 2017, B, 10&lt;BR /&gt;4 Jan 2017, Bundle Y, 5];&lt;/P&gt;&lt;P&gt;[BUNDLES]:&lt;BR /&gt;LOAD * INLINE [&lt;BR /&gt;ParentSKU, ComponentSKU, Quantity&lt;BR /&gt;Bundle X, A, 3&lt;BR /&gt;Bundle X, B, 5&lt;BR /&gt;Bundle X, C, 10&lt;BR /&gt;Bundle Y, P, 5&lt;BR /&gt;Bundle Y, Q, 7&lt;BR /&gt;Bundle Y, R, 12&lt;BR /&gt;Bundle Y, S, 3];&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;[m]:&lt;BR /&gt;MAPPING LOAD ParentSKU, &lt;FONT color="#FF0000"&gt;ComponentSKU&amp;amp;'|'&amp;amp;Quantity&amp;amp;chr(1&lt;/FONT&gt;) as m&lt;BR /&gt;RESIDENT BUNDLES;&lt;/P&gt;&lt;P&gt;[t]:&lt;BR /&gt;load *, Qty * Qty2 as Qty3; // any further transformations&lt;BR /&gt;load *, subfield(Product2, '|', 1) as Product3, subfield(Product2, '|', 2) as Qty2;&lt;BR /&gt;load *, subfield(Product, chr(1)) as Product2;&lt;BR /&gt;load Date, Product, applymap('m', Product, Product) as Product1, Qty&lt;BR /&gt;Resident Transactions;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Apr 2021 10:19:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/Separate-transaction-rows-for-bundled-products/m-p/1801247#M8820</guid>
      <dc:creator>ThomasS</dc:creator>
      <dc:date>2021-04-21T10:19:41Z</dc:date>
    </item>
    <item>
      <title>Re: Separate transaction rows for bundled products</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Separate-transaction-rows-for-bundled-products/m-p/1801253#M8821</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/120760"&gt;@ThomasS&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you are using Concat() function, you need to use Group by&lt;/P&gt;&lt;P&gt;Try like below&lt;/P&gt;&lt;P&gt;[m]:&lt;BR /&gt;MAPPING LOAD ParentSKU, Concat(ComponentSKU&amp;amp;'|'&amp;amp;Quantity,chr(1)) as m&lt;BR /&gt;RESIDENT BUNDLES&lt;BR /&gt;Group by ParentSKU;&lt;/P&gt;&lt;P&gt;And also, Qlik is case sensitive, table name "TRANSACTIONS" is not&amp;nbsp;&lt;SPAN&gt;Transactions&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Apr 2021 10:32:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/Separate-transaction-rows-for-bundled-products/m-p/1801253#M8821</guid>
      <dc:creator>MayilVahanan</dc:creator>
      <dc:date>2021-04-21T10:32:40Z</dc:date>
    </item>
    <item>
      <title>Re: Separate transaction rows for bundled products</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Separate-transaction-rows-for-bundled-products/m-p/1801254#M8822</link>
      <description>&lt;P&gt;What for an error? Ah, I see I missed the group by within the aggregation load - change it to:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;m: mapping load ParentSKU, concat(ComponentSKU &amp;amp; '|' &amp;amp; Quantity, chr(1))&lt;BR /&gt;from Bundles &lt;STRONG&gt;group by ParentSKU&lt;/STRONG&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;- Marcus&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Apr 2021 10:34:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/Separate-transaction-rows-for-bundled-products/m-p/1801254#M8822</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2021-04-21T10:34:36Z</dc:date>
    </item>
    <item>
      <title>Re: Separate transaction rows for bundled products</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Separate-transaction-rows-for-bundled-products/m-p/1801258#M8823</link>
      <description>&lt;P&gt;Thanks &lt;A href="https://community.qlik.com/t5/user/viewprofilepage/user-id/28038" target="_blank" rel="noopener"&gt;Marcus_sommer&lt;/A&gt; &amp;amp;&amp;nbsp;&lt;A href="https://community.qlik.com/t5/user/viewprofilepage/user-id/17935" target="_blank" rel="noopener"&gt;MayilVahanan,&amp;nbsp;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;The Group BY clause was indeed missing. I got through the script without any errors this time. I had to make one more adjustment in the script:&amp;nbsp;&lt;/P&gt;&lt;P&gt;load *, subfield(Product&lt;FONT color="#0000FF"&gt;&lt;U&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/U&gt;&lt;/FONT&gt;, chr(1)) as Product2 instead of&amp;nbsp;load *, subfield(Product, chr(1)) as Product2&lt;/P&gt;&lt;P&gt;Thanks you very much for the patience!&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;BR /&gt;Thomas&lt;/P&gt;&lt;P&gt;[TRANSACTIONS]:&lt;BR /&gt;LOAD * INLINE [&lt;BR /&gt;Date, Product, Qty&lt;BR /&gt;1 Jan 2017, A, 10&lt;BR /&gt;2 Jan 2017, Bundle X, 5&lt;BR /&gt;3 Jan 2017, B, 10&lt;BR /&gt;4 Jan 2017, Bundle Y, 5];&lt;/P&gt;&lt;P&gt;[BUNDLES]:&lt;BR /&gt;LOAD * INLINE [&lt;BR /&gt;ParentSKU, ComponentSKU, Quantity&lt;BR /&gt;Bundle X, A, 3&lt;BR /&gt;Bundle X, B, 5&lt;BR /&gt;Bundle X, C, 10&lt;BR /&gt;Bundle Y, P, 5&lt;BR /&gt;Bundle Y, Q, 7&lt;BR /&gt;Bundle Y, R, 12&lt;BR /&gt;Bundle Y, S, 3];&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;[m]:&lt;BR /&gt;MAPPING LOAD ParentSKU, Concat(ComponentSKU&amp;amp;'|'&amp;amp;Quantity,chr(1)) as m&lt;BR /&gt;RESIDENT BUNDLES&lt;BR /&gt;Group by ParentSKU;&lt;/P&gt;&lt;P&gt;[t]:&lt;BR /&gt;load *, Qty * Qty2 as Qty3; // any further transformations&lt;BR /&gt;load *, subfield(Product2, '|', 1) as Product3, subfield(Product2, '|', 2) as Qty2;&lt;BR /&gt;load *, subfield(Product1, chr(1)) as Product2;&lt;BR /&gt;load Date, Product, applymap('m', Product, Product) as Product1, Qty&lt;BR /&gt;Resident TRANSACTIONS;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Apr 2021 11:45:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/Separate-transaction-rows-for-bundled-products/m-p/1801258#M8823</guid>
      <dc:creator>ThomasS</dc:creator>
      <dc:date>2021-04-21T11:45:51Z</dc:date>
    </item>
  </channel>
</rss>

