<?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: Define dimension! in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Define-dimension/m-p/1979036#M1220907</link>
    <description>&lt;P&gt;&lt;SPAN&gt;Clarify the example.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 09 Sep 2022 05:13:17 GMT</pubDate>
    <dc:creator>BrunPierre</dc:creator>
    <dc:date>2022-09-09T05:13:17Z</dc:date>
    <item>
      <title>Define dimension!</title>
      <link>https://community.qlik.com/t5/QlikView/Define-dimension/m-p/1978784#M1220896</link>
      <description>&lt;P&gt;Hi, i have a database on qlikview where there are several data by days.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would like to define a dimension based on the most recent value.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Example: for the combination of KIT/LOT i would like to define a dimension that should be equal to the last value available in the column "Location". How this can be done ?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;THank you!!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="qlikviewaf_0-1662648575574.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/88665i356BC3F2EFB7EE27/image-size/medium?v=v2&amp;amp;px=400" role="button" title="qlikviewaf_0-1662648575574.png" alt="qlikviewaf_0-1662648575574.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Sep 2022 14:50:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Define-dimension/m-p/1978784#M1220896</guid>
      <dc:creator>qlikviewaf</dc:creator>
      <dc:date>2022-09-08T14:50:59Z</dc:date>
    </item>
    <item>
      <title>Re: Define dimension!</title>
      <link>https://community.qlik.com/t5/QlikView/Define-dimension/m-p/1979036#M1220907</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Clarify the example.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Sep 2022 05:13:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Define-dimension/m-p/1979036#M1220907</guid>
      <dc:creator>BrunPierre</dc:creator>
      <dc:date>2022-09-09T05:13:17Z</dc:date>
    </item>
    <item>
      <title>Re: Define dimension!</title>
      <link>https://community.qlik.com/t5/QlikView/Define-dimension/m-p/1979068#M1220911</link>
      <description>&lt;P&gt;I would like for a combination of &lt;STRONG&gt;KIT&lt;/STRONG&gt; and &lt;STRONG&gt;Lot, &lt;/STRONG&gt;to have&amp;nbsp;the "dimension to define" always equal to the most recent value available on the field "Location".&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For the KIT A Lot 12 - the most recent value is related to date 04/01/2022 and the Location is equal to warehouse - so the location to be defined should be always warehouse.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;let me know if not clear,&lt;/P&gt;
&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Fri, 09 Sep 2022 07:03:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Define-dimension/m-p/1979068#M1220911</guid>
      <dc:creator>qlikviewaf</dc:creator>
      <dc:date>2022-09-09T07:03:00Z</dc:date>
    </item>
    <item>
      <title>Re: Define dimension!</title>
      <link>https://community.qlik.com/t5/QlikView/Define-dimension/m-p/1979154#M1220921</link>
      <description>&lt;P&gt;Something like this&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Data:
LOAD * Inline[
Date,Kit,Lot,Location
01/01/2022,A,12,Consignment
03/01/2022,A,12,Warehouse
04/01/2022,A,12,Warehouse
01/01/2022,Z,874,Consignment
03/01/2022,Z,874,Consignment
04/01/2022,Z,874,Consignment];

Left Join(Data)
LOAD Kit,
     Lot,
Maxstring(Location) as DimensionToDefine,
Max(Date(Date)) as Date

Resident Data
Group By Kit,Lot;&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Sep 2022 09:44:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Define-dimension/m-p/1979154#M1220921</guid>
      <dc:creator>BrunPierre</dc:creator>
      <dc:date>2022-09-09T09:44:01Z</dc:date>
    </item>
    <item>
      <title>Re: Define dimension!</title>
      <link>https://community.qlik.com/t5/QlikView/Define-dimension/m-p/1979365#M1220932</link>
      <description>&lt;P&gt;I think this will do it...&lt;/P&gt;
&lt;P&gt;After you load your data, use FirstSortedValue with the sort_weight being "-Date" and join via Kit &amp;amp; Lot. You may need to sort by Kit, Lot and Date ascending if they aren't already sorted by those fields.&lt;/P&gt;
&lt;P&gt;Data:&lt;BR /&gt;LOAD * Inline[&lt;BR /&gt;Date,Kit,Lot,Location&lt;BR /&gt;01/01/2022,A,12,Consignment&lt;BR /&gt;03/01/2022,A,12,Warehouse&lt;BR /&gt;04/01/2022,A,12,Warehouse&lt;BR /&gt;01/01/2022,Z,874,Consignment&lt;BR /&gt;03/01/2022,Z,874,Consignment&lt;BR /&gt;04/01/2022,Z,874,Consignment];&lt;/P&gt;
&lt;P&gt;Latest:&lt;BR /&gt;Left Join(Data)&lt;BR /&gt;LOAD &lt;BR /&gt;Kit,&lt;BR /&gt;Lot,&lt;BR /&gt;FirstSortedValue(Location,-Date) as DimensionToDefine&lt;BR /&gt;Resident Data&lt;BR /&gt;group by Kit,Lot&lt;BR /&gt;;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JohnInSD_0-1662745266017.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/88827i12BF8769B6E0E858/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JohnInSD_0-1662745266017.png" alt="JohnInSD_0-1662745266017.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;HTH,&lt;/P&gt;
&lt;P&gt;JohnInSD&lt;/P&gt;
&lt;P&gt;(aka johncaqc)&lt;/P&gt;</description>
      <pubDate>Fri, 09 Sep 2022 17:41:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Define-dimension/m-p/1979365#M1220932</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-09-09T17:41:41Z</dc:date>
    </item>
  </channel>
</rss>

