<?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 Using concat() in Load Script in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Using-concat-in-Load-Script/m-p/1943031#M77704</link>
    <description>&lt;P&gt;Hi, Experts,&lt;/P&gt;
&lt;P&gt;I have an app with a data model in a snowflake schema. Customers are linked to products ordered using a cross table. (There are many other tables in the data model; we won't go into that.)&lt;/P&gt;
&lt;P&gt;My audience would like to see a table chart in the app that displays one row per customer, with all the products that customer has ordered in a single cell in the table chart.&lt;/P&gt;
&lt;P&gt;I know I can use an expression in the table chart like concat(ProductName, ', ') to create a comma delimited list. However, in my real-world app, there are more than 250,000 customers, many with multiple product orders, and using the concat function in the table chart is bogging down performance.&lt;/P&gt;
&lt;P&gt;I am running into an issue using concat() in the load script, since the ProductName and CustomerID are in two separate tables.&lt;/P&gt;
&lt;P&gt;The attached qvf contains a very simple example of 7 customers ordering 10 different products. The Excel document contains the dummy data and the "desired output" tab shows what I'm trying to replicate in the Qlik app.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would appreciate any help you can offer to resolve this! Thanks!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 13 Jun 2022 18:53:30 GMT</pubDate>
    <dc:creator>Susan_DS</dc:creator>
    <dc:date>2022-06-13T18:53:30Z</dc:date>
    <item>
      <title>Using concat() in Load Script</title>
      <link>https://community.qlik.com/t5/App-Development/Using-concat-in-Load-Script/m-p/1943031#M77704</link>
      <description>&lt;P&gt;Hi, Experts,&lt;/P&gt;
&lt;P&gt;I have an app with a data model in a snowflake schema. Customers are linked to products ordered using a cross table. (There are many other tables in the data model; we won't go into that.)&lt;/P&gt;
&lt;P&gt;My audience would like to see a table chart in the app that displays one row per customer, with all the products that customer has ordered in a single cell in the table chart.&lt;/P&gt;
&lt;P&gt;I know I can use an expression in the table chart like concat(ProductName, ', ') to create a comma delimited list. However, in my real-world app, there are more than 250,000 customers, many with multiple product orders, and using the concat function in the table chart is bogging down performance.&lt;/P&gt;
&lt;P&gt;I am running into an issue using concat() in the load script, since the ProductName and CustomerID are in two separate tables.&lt;/P&gt;
&lt;P&gt;The attached qvf contains a very simple example of 7 customers ordering 10 different products. The Excel document contains the dummy data and the "desired output" tab shows what I'm trying to replicate in the Qlik app.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would appreciate any help you can offer to resolve this! Thanks!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jun 2022 18:53:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Using-concat-in-Load-Script/m-p/1943031#M77704</guid>
      <dc:creator>Susan_DS</dc:creator>
      <dc:date>2022-06-13T18:53:30Z</dc:date>
    </item>
    <item>
      <title>Re: Using concat() in Load Script</title>
      <link>https://community.qlik.com/t5/App-Development/Using-concat-in-Load-Script/m-p/1943737#M77763</link>
      <description>&lt;P&gt;To do this in the script you'll have to create at least a temporary association between CustomerObjId and ProductName. You could do that by&lt;/P&gt;
&lt;P&gt;1. Join ProductName to the CrossTable.&lt;/P&gt;
&lt;P&gt;2. Load CustomerObjid, concat(ProductName) resident CrossTable group by CustomerObjId.&lt;/P&gt;
&lt;P&gt;3. Drop ProductName from CrossTable.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also see&amp;nbsp;&lt;A href="https://qlikviewcookbook.com/2020/03/creating-temporary-script-associations/" target="_blank"&gt;https://qlikviewcookbook.com/2020/03/creating-temporary-script-associations/&lt;/A&gt;&amp;nbsp;for tips on creating temporary script associations.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;-Rob&lt;BR /&gt;&lt;A href="http://www.easyqlik.com" target="_blank"&gt;http://www.easyqlik.com&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://masterssummit.com" target="_blank"&gt;http://masterssummit.com&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://qlikviewcookbook.com" target="_blank"&gt;http://qlikviewcookbook.com&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jun 2022 04:28:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Using-concat-in-Load-Script/m-p/1943737#M77763</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2022-06-15T04:28:37Z</dc:date>
    </item>
    <item>
      <title>Re: Using concat() in Load Script</title>
      <link>https://community.qlik.com/t5/App-Development/Using-concat-in-Load-Script/m-p/1945226#M77896</link>
      <description>&lt;P&gt;Thanks very much, Rob. Appreciate your insights and this very informative post!&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I applied your proposed solution above, but I think I may have missed something in the Load script. The table chart is now displaying all 10 products in a concatenated string for every customer. My goal is to only show the concatenated string of product name values specific to each customer in the table chart.&lt;/P&gt;
&lt;P&gt;Would you take a look at below and let me know where I am missing the step?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;//Dimension&lt;BR /&gt;[Products]:&lt;BR /&gt;LOAD&lt;BR /&gt;[ObjectID] AS [ProductObjID],&lt;BR /&gt;[ProductID],&lt;BR /&gt;[ProductName],&lt;BR /&gt;[Price]&lt;BR /&gt;FROM [lib://AttachedFiles/TestData.xlsx]&lt;BR /&gt;(ooxml, embedded labels, table is Products);&lt;/P&gt;
&lt;P&gt;//For connecting fact table and dimensions&lt;BR /&gt;[CrossTable]:&lt;BR /&gt;// Unqualify [ObjectID];&lt;BR /&gt;LOAD&lt;BR /&gt;[ObjectID],&lt;BR /&gt;[CustomerObjID],&lt;BR /&gt;[ProductObjID]&lt;BR /&gt;FROM [lib://AttachedFiles/TestData.xlsx]&lt;BR /&gt;(ooxml, embedded labels, table is [Cross-Table]);&lt;/P&gt;
&lt;P&gt;//Fact table&lt;BR /&gt;[Customers]:&lt;BR /&gt;LOAD&lt;BR /&gt;[ObjectID] AS [CustomerObjID],&lt;BR /&gt;[CustomerID],&lt;BR /&gt;[CustomerName],&lt;BR /&gt;[CustomerAddress1],&lt;BR /&gt;[CustomerCity],&lt;BR /&gt;[CustomerStateProv],&lt;BR /&gt;APPLYMAP( '__cityKey2GeoPoint', APPLYMAP( '__cityName2Key', LOWER([CustomerCity])), '-') AS [Customers.CustomerCity_GeoInfo]&lt;BR /&gt;FROM [lib://AttachedFiles/TestData.xlsx]&lt;BR /&gt;(ooxml, embedded labels, table is Customers);&lt;/P&gt;
&lt;P&gt;Join([CrossTable])&lt;BR /&gt;Load [ProductName]&lt;BR /&gt;Resident [Products]&lt;BR /&gt;;&lt;/P&gt;
&lt;P&gt;Load CustomerObjID, &lt;BR /&gt;concat(distinct ProductName, ', ') as ConcatProductName&lt;BR /&gt;Resident CrossTable&lt;BR /&gt;Group by CustomerObjID&lt;BR /&gt;;&lt;/P&gt;
&lt;P&gt;Drop field [ProductName] from [CrossTable]&lt;BR /&gt;;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jun 2022 20:14:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Using-concat-in-Load-Script/m-p/1945226#M77896</guid>
      <dc:creator>Susan_DS</dc:creator>
      <dc:date>2022-06-17T20:14:51Z</dc:date>
    </item>
  </channel>
</rss>

