<?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: Several dimension use in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Several-dimension-use/m-p/1978988#M1220905</link>
    <description>&lt;P&gt;After your original table load, try this:&lt;/P&gt;&lt;P&gt;NewData:&lt;BR /&gt;Load [Document ID],&lt;BR /&gt;[Country ID],&lt;BR /&gt;[Field],&lt;BR /&gt;Timestamp(Max([Date stamp])) as MaxDateStamp&lt;BR /&gt;Resident Data&lt;BR /&gt;Group by [Document ID], [Country ID], [Field];&lt;BR /&gt;&lt;BR /&gt;Left Join(NewData)&lt;BR /&gt;Load [Document ID],&lt;BR /&gt;[Country ID],&lt;BR /&gt;[Field],&lt;BR /&gt;[Date stamp] as MaxDateStamp,&lt;BR /&gt;[Answer]&lt;BR /&gt;Resident Data;&lt;/P&gt;&lt;P&gt;Drop Table Data;&lt;/P&gt;</description>
    <pubDate>Thu, 08 Sep 2022 23:39:34 GMT</pubDate>
    <dc:creator>Lisa_P</dc:creator>
    <dc:date>2022-09-08T23:39:34Z</dc:date>
    <item>
      <title>Several dimension use</title>
      <link>https://community.qlik.com/t5/QlikView/Several-dimension-use/m-p/1978958#M1220903</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;I would need your help on the below problem.&lt;/P&gt;
&lt;P&gt;I know how to group 1 dimension, however when I have several dimensions to group it is not working.&lt;/P&gt;
&lt;P&gt;For the lines highligted in red, I need to keep only the yellow one (the line with the latest value for the same Document ID+CountryID+Field). The line to keep can contain "false" or "true" as Answer (even if we see only examples with false in the screenshot below).&lt;/P&gt;
&lt;P&gt;I have attached a file with my data if it can help.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="pachi12_0-1662666524460.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/88743i17E9270715C16470/image-size/medium?v=v2&amp;amp;px=400" role="button" title="pachi12_0-1662666524460.png" alt="pachi12_0-1662666524460.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;My script is:&lt;/P&gt;
&lt;P&gt;Data:&lt;/P&gt;
&lt;P&gt;LOAD&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "Document ID",&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "Country ID",&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "Field",&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "Date stamp",&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "Answer"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;NoConcatenate&lt;/P&gt;
&lt;P&gt;LOAD&lt;/P&gt;
&lt;P&gt;"Document ID",&lt;/P&gt;
&lt;P&gt;"Country ID",&lt;/P&gt;
&lt;P&gt;"Field",&lt;/P&gt;
&lt;P&gt;"Answer"&lt;/P&gt;
&lt;P&gt;LastValue(Date stamp) as Date_stamp&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Resident Data&lt;/P&gt;
&lt;P&gt;Group By "Document ID", "Country ID", Field, "Answer",&lt;/P&gt;
&lt;P&gt;Order By "Document ID", Field;&lt;/P&gt;
&lt;P&gt;DROP Table Data;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Would you please help me?&lt;/P&gt;
&lt;P&gt;Thanks in advance&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Sep 2022 20:00:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Several-dimension-use/m-p/1978958#M1220903</guid>
      <dc:creator>pachi12</dc:creator>
      <dc:date>2022-09-08T20:00:46Z</dc:date>
    </item>
    <item>
      <title>Re: Several dimension use</title>
      <link>https://community.qlik.com/t5/QlikView/Several-dimension-use/m-p/1978988#M1220905</link>
      <description>&lt;P&gt;After your original table load, try this:&lt;/P&gt;&lt;P&gt;NewData:&lt;BR /&gt;Load [Document ID],&lt;BR /&gt;[Country ID],&lt;BR /&gt;[Field],&lt;BR /&gt;Timestamp(Max([Date stamp])) as MaxDateStamp&lt;BR /&gt;Resident Data&lt;BR /&gt;Group by [Document ID], [Country ID], [Field];&lt;BR /&gt;&lt;BR /&gt;Left Join(NewData)&lt;BR /&gt;Load [Document ID],&lt;BR /&gt;[Country ID],&lt;BR /&gt;[Field],&lt;BR /&gt;[Date stamp] as MaxDateStamp,&lt;BR /&gt;[Answer]&lt;BR /&gt;Resident Data;&lt;/P&gt;&lt;P&gt;Drop Table Data;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Sep 2022 23:39:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Several-dimension-use/m-p/1978988#M1220905</guid>
      <dc:creator>Lisa_P</dc:creator>
      <dc:date>2022-09-08T23:39:34Z</dc:date>
    </item>
    <item>
      <title>Re: Several dimension use</title>
      <link>https://community.qlik.com/t5/QlikView/Several-dimension-use/m-p/1979106#M1220917</link>
      <description>&lt;P&gt;Thanks Lisa for the proposal but I have an error message that Table 'Data' is not found&lt;/P&gt;
&lt;P&gt;Did I make an error somewhere?&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="pachi12_0-1662709933236.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/88778i7D42F01E43419564/image-size/medium?v=v2&amp;amp;px=400" role="button" title="pachi12_0-1662709933236.png" alt="pachi12_0-1662709933236.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Sep 2022 07:52:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Several-dimension-use/m-p/1979106#M1220917</guid>
      <dc:creator>pachi12</dc:creator>
      <dc:date>2022-09-09T07:52:43Z</dc:date>
    </item>
    <item>
      <title>Re: Several dimension use</title>
      <link>https://community.qlik.com/t5/QlikView/Several-dimension-use/m-p/1979131#M1220919</link>
      <description>&lt;P&gt;Maybe something like this for an alternative approach&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Temp:
LOAD [Document ID], 
     [Country ID], 
     Field, 
Timestamp(Timestamp#([Date stamp],'DD/MM/YYYY hh:mm:ss'),'DD/MM/YYYY hh:mm:ss') AS [Date stamp],
     Answer,
     [Document ID]&amp;amp;'|'&amp;amp;[Country ID]&amp;amp;'|'&amp;amp;Field as %Key
FROM
[..\Downloads\Example data for QlikSense.xlsx]
(ooxml, embedded labels, table is Sheet);

NoConcatenate
Final:
LOAD %Key, 
MAX([Date stamp]) AS [Date stamp]

Resident Temp
Group By %Key
Order By %Key;

Left Join(Final)
LOAD %Key,
     [Document ID], 
     [Country ID], 
     Field,
    [Date stamp],
     Answer
     
Resident Temp;       
DROP Table Temp;     
DROP Field %Key;&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Sep 2022 13:29:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Several-dimension-use/m-p/1979131#M1220919</guid>
      <dc:creator>BrunPierre</dc:creator>
      <dc:date>2022-09-12T13:29:46Z</dc:date>
    </item>
    <item>
      <title>Re: Several dimension use</title>
      <link>https://community.qlik.com/t5/QlikView/Several-dimension-use/m-p/1979669#M1220955</link>
      <description>&lt;P&gt;Thanks for the proposal.&lt;/P&gt;
&lt;P&gt;I had an error (duplicate fields, and FT table not existing) so I modified the script as follow (I hope this is good):&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="pachi12_0-1662968506395.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/88872iF39468BC72613C32/image-size/medium?v=v2&amp;amp;px=400" role="button" title="pachi12_0-1662968506395.png" alt="pachi12_0-1662968506395.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;The max date has been put in each line, however there are still duplicate and "old" value is still visible (i.e. for the country ID "0" only the 'false' value should have been kept):&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="pachi12_1-1662968604332.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/88873i762B305869F7187F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="pachi12_1-1662968604332.png" alt="pachi12_1-1662968604332.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Is there something worng in the script I updated?&lt;/P&gt;
&lt;P&gt;Thanks in advance!&lt;/P&gt;</description>
      <pubDate>Mon, 12 Sep 2022 07:44:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Several-dimension-use/m-p/1979669#M1220955</guid>
      <dc:creator>pachi12</dc:creator>
      <dc:date>2022-09-12T07:44:28Z</dc:date>
    </item>
    <item>
      <title>Re: Several dimension use</title>
      <link>https://community.qlik.com/t5/QlikView/Several-dimension-use/m-p/1979884#M1220958</link>
      <description>&lt;P&gt;That's the exact output when it's properly sorted. Try again with the modified script and use the formatted Date Stamp as it appears to be an issue in your sample.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="peter_brown_2-1662989841074.png" style="width: 739px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/88904iBB4534C7F5D174BB/image-dimensions/739x136?v=v2" width="739" height="136" role="button" title="peter_brown_2-1662989841074.png" alt="peter_brown_2-1662989841074.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Sep 2022 13:58:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Several-dimension-use/m-p/1979884#M1220958</guid>
      <dc:creator>BrunPierre</dc:creator>
      <dc:date>2022-09-12T13:58:59Z</dc:date>
    </item>
  </channel>
</rss>

