<?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: join several strings into one with key in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/join-several-strings-into-one-with-key/m-p/2413638#M1225245</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/286076"&gt;@MilkyWay&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;Here's one possible method:&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;//Upload your generic information (by creating a key) and with your initial date
TEMP:
Load
	ID_D&amp;amp;ID_K&amp;amp;ID_C as KEY,
	ID_D,ID_K,ID_C,Data_P,Sum_P
FROM your_data
where not isnull(Data_P);

//Join the rest of your missing information using your key, and you'll get a non-empty table
left join(TEMP)
Load
	ID_D&amp;amp;ID_K&amp;amp;ID_C as KEY,
        Data_F,Sum_F
FROM your_data
where not isnull(Data_F);

//To remove values where Sum_P must be 0, create a new table, sorted by key and date Data_F, if your key is identical to the previous one (Peek(KEY)=KEY) then 0, otherwise Sum_P since it's the first row
NoConcatenate
FINAL:
Load
	KEY,ID_D,ID_K,ID_C,Data_P,
    if(Peek(KEY)=KEY,0,Sum_P) as Sum_P,
    Data_F,Sum_F
Resident TEMP
order by KEY,Data_F;
drop table TEMP;&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Pierrick&lt;/P&gt;</description>
    <pubDate>Thu, 01 Feb 2024 14:52:13 GMT</pubDate>
    <dc:creator>Pierrick</dc:creator>
    <dc:date>2024-02-01T14:52:13Z</dc:date>
    <item>
      <title>join several strings into one with key</title>
      <link>https://community.qlik.com/t5/QlikView/join-several-strings-into-one-with-key/m-p/2413409#M1225235</link>
      <description>&lt;P&gt;Hi Community,&lt;/P&gt;
&lt;P&gt;I&amp;nbsp;have table :&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MilkyWay_0-1706770135644.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/158829iA9AB463E4D771FFF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MilkyWay_0-1706770135644.png" alt="MilkyWay_0-1706770135644.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;and need to get like this throw the script&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MilkyWay_2-1706770848265.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/158831i8AAB85F6CD448F8B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MilkyWay_2-1706770848265.png" alt="MilkyWay_2-1706770848265.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I need to get one table because it will be store qvd for next working.&lt;/P&gt;
&lt;P&gt;Help me please)&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Yelena&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Feb 2024 07:02:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/join-several-strings-into-one-with-key/m-p/2413409#M1225235</guid>
      <dc:creator>MilkyWay</dc:creator>
      <dc:date>2024-02-01T07:02:28Z</dc:date>
    </item>
    <item>
      <title>Re: join several strings into one with key</title>
      <link>https://community.qlik.com/t5/QlikView/join-several-strings-into-one-with-key/m-p/2413638#M1225245</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/286076"&gt;@MilkyWay&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;Here's one possible method:&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;//Upload your generic information (by creating a key) and with your initial date
TEMP:
Load
	ID_D&amp;amp;ID_K&amp;amp;ID_C as KEY,
	ID_D,ID_K,ID_C,Data_P,Sum_P
FROM your_data
where not isnull(Data_P);

//Join the rest of your missing information using your key, and you'll get a non-empty table
left join(TEMP)
Load
	ID_D&amp;amp;ID_K&amp;amp;ID_C as KEY,
        Data_F,Sum_F
FROM your_data
where not isnull(Data_F);

//To remove values where Sum_P must be 0, create a new table, sorted by key and date Data_F, if your key is identical to the previous one (Peek(KEY)=KEY) then 0, otherwise Sum_P since it's the first row
NoConcatenate
FINAL:
Load
	KEY,ID_D,ID_K,ID_C,Data_P,
    if(Peek(KEY)=KEY,0,Sum_P) as Sum_P,
    Data_F,Sum_F
Resident TEMP
order by KEY,Data_F;
drop table TEMP;&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Pierrick&lt;/P&gt;</description>
      <pubDate>Thu, 01 Feb 2024 14:52:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/join-several-strings-into-one-with-key/m-p/2413638#M1225245</guid>
      <dc:creator>Pierrick</dc:creator>
      <dc:date>2024-02-01T14:52:13Z</dc:date>
    </item>
    <item>
      <title>Re: join several strings into one with key</title>
      <link>https://community.qlik.com/t5/QlikView/join-several-strings-into-one-with-key/m-p/2413844#M1225247</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;SPAN&gt;Pierrick, Thanks a lot!&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":smiling_face_with_smiling_eyes:"&gt;😊&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Feb 2024 08:34:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/join-several-strings-into-one-with-key/m-p/2413844#M1225247</guid>
      <dc:creator>MilkyWay</dc:creator>
      <dc:date>2024-02-02T08:34:59Z</dc:date>
    </item>
  </channel>
</rss>

