<?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 avoid data duplication when unpivoting data using concatenate in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/How-to-avoid-data-duplication-when-unpivoting-data-using/m-p/2549255#M110276</link>
    <description>&lt;P&gt;What you're describing is inherently going to duplicate data. This isn't a technical issue, it's a logical issue. You need to apply a logical solution to decide how you want to avoid duplication in this scenario, and then you (or people here) can help figure out the code aspect.&lt;/P&gt;&lt;P&gt;That said, if your entire issue is with Section Access, you can just leave the separated Operator fields and add a composite security key. Have a look at&amp;nbsp;&lt;A href="https://community.qlik.com/t5/Design/Basics-for-complex-authorization/ba-p/1465872" target="_blank"&gt;https://community.qlik.com/t5/Design/Basics-for-complex-authorization/ba-p/1465872&lt;/A&gt;&amp;nbsp;or just ask your friendly neighborhood AI about composite section access keys.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 17 May 2026 11:26:12 GMT</pubDate>
    <dc:creator>Or</dc:creator>
    <dc:date>2026-05-17T11:26:12Z</dc:date>
    <item>
      <title>How to avoid data duplication when unpivoting data using concatenate</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-avoid-data-duplication-when-unpivoting-data-using/m-p/2549253#M110275</link>
      <description>&lt;P&gt;Hi all. Please advise how to avoid data duplication for the example below?&lt;BR /&gt;I have 2 tables&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;tab1:&lt;BR /&gt;Load&lt;BR /&gt;&amp;nbsp; &amp;nbsp; calendar_key,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; product_key,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; operator_code_1,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; operator_code_2&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; sales_dollar,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; sales_unit&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;from Sales;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;tab2:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Load&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; operator_key,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; operator_Id,&lt;BR /&gt;&lt;/SPAN&gt;&amp;nbsp; &amp;nbsp; operator_name&lt;BR /&gt;&lt;SPAN&gt;from Operator;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I need to connect these tables using condition that operator_key = operator_code_1 and operator_key = operator_code_2.&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;My idea is to solve it like this&lt;BR /&gt;&lt;BR /&gt;Tab_Fact:&lt;BR /&gt;&lt;SPAN&gt;Load&lt;BR /&gt;&amp;nbsp; &amp;nbsp; calendar_key,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; product_key,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; operator_code_1 as operator_key,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; sales_dollar,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; sales_unit&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;from Sales;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;Concatenate(Tab_Fact)&lt;BR /&gt;Load&lt;BR /&gt;&amp;nbsp; &amp;nbsp; calendar_key,&lt;BR /&gt;&amp;nbsp; &amp;nbsp; product_key,&lt;BR /&gt;&amp;nbsp; &amp;nbsp; operator_code_2 as&amp;nbsp;operator_key,&lt;BR /&gt;&amp;nbsp; &amp;nbsp; sales_dollar,&lt;BR /&gt;&amp;nbsp; &amp;nbsp; sales_unit&lt;BR /&gt;from Sales;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;But as result of this solution makes data duplication. And I'm struggling to find solution that will allow to avoid it.&amp;nbsp;&lt;BR /&gt;Also, just map&amp;nbsp;&lt;SPAN&gt;operator_key to&amp;nbsp;operator_code_1 and&amp;nbsp;operator_code_2 is not an option. Operator_Id field should be used as single fields for the section access.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;I'll appreciate any ideas on this case.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 17 May 2026 10:23:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-avoid-data-duplication-when-unpivoting-data-using/m-p/2549253#M110275</guid>
      <dc:creator>Peony</dc:creator>
      <dc:date>2026-05-17T10:23:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to avoid data duplication when unpivoting data using concatenate</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-avoid-data-duplication-when-unpivoting-data-using/m-p/2549255#M110276</link>
      <description>&lt;P&gt;What you're describing is inherently going to duplicate data. This isn't a technical issue, it's a logical issue. You need to apply a logical solution to decide how you want to avoid duplication in this scenario, and then you (or people here) can help figure out the code aspect.&lt;/P&gt;&lt;P&gt;That said, if your entire issue is with Section Access, you can just leave the separated Operator fields and add a composite security key. Have a look at&amp;nbsp;&lt;A href="https://community.qlik.com/t5/Design/Basics-for-complex-authorization/ba-p/1465872" target="_blank"&gt;https://community.qlik.com/t5/Design/Basics-for-complex-authorization/ba-p/1465872&lt;/A&gt;&amp;nbsp;or just ask your friendly neighborhood AI about composite section access keys.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 17 May 2026 11:26:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-avoid-data-duplication-when-unpivoting-data-using/m-p/2549255#M110276</guid>
      <dc:creator>Or</dc:creator>
      <dc:date>2026-05-17T11:26:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to avoid data duplication when unpivoting data using concatenate</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-avoid-data-duplication-when-unpivoting-data-using/m-p/2549258#M110277</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/7275"&gt;@Peony&lt;/a&gt;&amp;nbsp;, you can try below code. you will get &lt;SPAN&gt;operator_Id in main table without any duplicates and it will also check&amp;nbsp;operator_key = operator_code_1 and operator_key = operator_code_2 in same table.&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Operator_Map:
Mapping
Load
    operator_key,
    operator_Id
From Operator;

Tab_Fact:
Load
    calendar_key,
    product_key,
    // First try operator_code_1
    // If not found then try operator_code_2
    ApplyMap(
        'Operator_Map',
        operator_code_1,
        ApplyMap('Operator_Map', operator_code_2, 'Unknown')
    ) as operator_Id,
    sales_dollar,
    sales_unit
From Sales;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 17 May 2026 14:39:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-avoid-data-duplication-when-unpivoting-data-using/m-p/2549258#M110277</guid>
      <dc:creator>vighnesh_gawad</dc:creator>
      <dc:date>2026-05-17T14:39:34Z</dc:date>
    </item>
  </channel>
</rss>

