<?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: Merging rows with same ID on non-null fields in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Merging-rows-with-same-ID-on-non-null-fields/m-p/1699787#M53594</link>
    <description>&lt;P&gt;If I understand you correctly you want one row with the Stage*Date variables, i.e.&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="25%"&gt;ID&lt;/TD&gt;&lt;TD width="25%"&gt;Stage1Date&lt;/TD&gt;&lt;TD width="25%"&gt;Stage2Date&lt;/TD&gt;&lt;TD width="25%"&gt;Stage3Date&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="25%"&gt;1&lt;/TD&gt;&lt;TD width="25%"&gt;01/01/2020&lt;/TD&gt;&lt;TD width="25%"&gt;01/02/2020&lt;/TD&gt;&lt;TD width="25%"&gt;01/03/2020&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This can be achieved via Left Join prefix and Where clause.&lt;/P&gt;&lt;P&gt;Example&lt;/P&gt;&lt;P&gt;Data:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;ID,&lt;/P&gt;&lt;P&gt;Stage1Date&lt;/P&gt;&lt;P&gt;From&amp;nbsp;&lt;EM&gt;DataSource&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Where Not IsNull(Stage1Date);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Left Join(Data)&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;ID,&lt;/P&gt;&lt;P&gt;Stage2Date&lt;/P&gt;&lt;P&gt;From&amp;nbsp;&lt;EM&gt;DataSource&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Where Not IsNull(Stage2Date);&lt;/P&gt;&lt;P&gt;etc.&lt;/P&gt;&lt;P&gt;See attachment for little explanation and example.&lt;/P&gt;</description>
    <pubDate>Thu, 07 May 2020 12:37:56 GMT</pubDate>
    <dc:creator>klikgevoel</dc:creator>
    <dc:date>2020-05-07T12:37:56Z</dc:date>
    <item>
      <title>Merging rows with same ID on non-null fields</title>
      <link>https://community.qlik.com/t5/App-Development/Merging-rows-with-same-ID-on-non-null-fields/m-p/1699723#M53587</link>
      <description>&lt;P&gt;I have a table in which the an ID appears several times, but for each, there's only one field that is not null:&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="25%" height="25px"&gt;ID&lt;/TD&gt;&lt;TD width="25%" height="25px"&gt;Stage1Date&lt;/TD&gt;&lt;TD width="25%" height="25px"&gt;Stage2Date&lt;/TD&gt;&lt;TD width="25%" height="25px"&gt;Stage3Date&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="25%" height="25px"&gt;1&lt;/TD&gt;&lt;TD width="25%" height="25px"&gt;01-01-2020&lt;/TD&gt;&lt;TD width="25%" height="25px"&gt;-&lt;/TD&gt;&lt;TD width="25%" height="25px"&gt;-&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="25%" height="25px"&gt;1&lt;/TD&gt;&lt;TD width="25%" height="25px"&gt;-&lt;/TD&gt;&lt;TD width="25%" height="25px"&gt;01-02-2020&lt;/TD&gt;&lt;TD width="25%" height="25px"&gt;-&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="25%" height="25px"&gt;1&lt;/TD&gt;&lt;TD width="25%" height="25px"&gt;-&lt;/TD&gt;&lt;TD width="25%" height="25px"&gt;-&lt;/TD&gt;&lt;TD width="25%" height="25px"&gt;01-03-2020&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a way in which I could merge these into a single row?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PS.&amp;nbsp; I built this table from another one that looked like this:&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="25%"&gt;ID&lt;/TD&gt;&lt;TD width="25%"&gt;ChangeDate&lt;/TD&gt;&lt;TD width="25%"&gt;InitialStage&lt;/TD&gt;&lt;TD width="25%"&gt;FinalStage&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="25%"&gt;1&lt;/TD&gt;&lt;TD width="25%"&gt;01/02/2020&lt;/TD&gt;&lt;TD width="25%"&gt;1&lt;/TD&gt;&lt;TD width="25%"&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="25%"&gt;1&lt;/TD&gt;&lt;TD width="25%"&gt;01/03/2020&lt;/TD&gt;&lt;TD width="25%"&gt;2&lt;/TD&gt;&lt;TD width="25%"&gt;3&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Therefore, if this could be solved more easily by changing the way the table is constructed I could do it too.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 02:29:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Merging-rows-with-same-ID-on-non-null-fields/m-p/1699723#M53587</guid>
      <dc:creator>FernandaNava</dc:creator>
      <dc:date>2024-11-16T02:29:55Z</dc:date>
    </item>
    <item>
      <title>Re: Merging rows with same ID on non-null fields</title>
      <link>https://community.qlik.com/t5/App-Development/Merging-rows-with-same-ID-on-non-null-fields/m-p/1699787#M53594</link>
      <description>&lt;P&gt;If I understand you correctly you want one row with the Stage*Date variables, i.e.&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="25%"&gt;ID&lt;/TD&gt;&lt;TD width="25%"&gt;Stage1Date&lt;/TD&gt;&lt;TD width="25%"&gt;Stage2Date&lt;/TD&gt;&lt;TD width="25%"&gt;Stage3Date&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="25%"&gt;1&lt;/TD&gt;&lt;TD width="25%"&gt;01/01/2020&lt;/TD&gt;&lt;TD width="25%"&gt;01/02/2020&lt;/TD&gt;&lt;TD width="25%"&gt;01/03/2020&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This can be achieved via Left Join prefix and Where clause.&lt;/P&gt;&lt;P&gt;Example&lt;/P&gt;&lt;P&gt;Data:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;ID,&lt;/P&gt;&lt;P&gt;Stage1Date&lt;/P&gt;&lt;P&gt;From&amp;nbsp;&lt;EM&gt;DataSource&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Where Not IsNull(Stage1Date);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Left Join(Data)&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;ID,&lt;/P&gt;&lt;P&gt;Stage2Date&lt;/P&gt;&lt;P&gt;From&amp;nbsp;&lt;EM&gt;DataSource&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Where Not IsNull(Stage2Date);&lt;/P&gt;&lt;P&gt;etc.&lt;/P&gt;&lt;P&gt;See attachment for little explanation and example.&lt;/P&gt;</description>
      <pubDate>Thu, 07 May 2020 12:37:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Merging-rows-with-same-ID-on-non-null-fields/m-p/1699787#M53594</guid>
      <dc:creator>klikgevoel</dc:creator>
      <dc:date>2020-05-07T12:37:56Z</dc:date>
    </item>
  </channel>
</rss>

