<?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: Grouping and sorting in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Grouping-and-sorting/m-p/1192566#M385148</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Works just fine!! Thanks a lot!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 12 Oct 2016 10:32:37 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2016-10-12T10:32:37Z</dc:date>
    <item>
      <title>Grouping and sorting</title>
      <link>https://community.qlik.com/t5/QlikView/Grouping-and-sorting/m-p/1192561#M385143</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a scenario where I have Country,Product, Subproduct. My date, Order and&amp;nbsp; Description are at subproduct level and I need to get the Description at product level based on foll logic:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First check subproduct date. choose the one with highest date. If two dates have same value, choose the one with lowest order. Take the description of that subproduct and assign it to Product.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kindly advice how to do it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PFA sample data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ruchi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Oct 2016 08:58:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Grouping-and-sorting/m-p/1192561#M385143</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-10-12T08:58:54Z</dc:date>
    </item>
    <item>
      <title>Re: Grouping and sorting</title>
      <link>https://community.qlik.com/t5/QlikView/Grouping-and-sorting/m-p/1192562#M385144</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Table:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD Market, &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Product, &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SubProduct, &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Product_Order, &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Pdt Valid From], &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Pdt_Description&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;FROM&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;SampleData.xls&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;(biff, embedded labels, table is Sheet1$);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Left Join (Table)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD Market,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; Product,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; FirstSortedValue(Pdt_Description, -([Pdt Valid From]*1000000 - Product_Order)) as New_Pdt_Description&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Resident Table&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Group By Market, Product;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Oct 2016 09:06:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Grouping-and-sorting/m-p/1192562#M385144</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-10-12T09:06:04Z</dc:date>
    </item>
    <item>
      <title>Re: Grouping and sorting</title>
      <link>https://community.qlik.com/t5/QlikView/Grouping-and-sorting/m-p/1192563#M385145</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Wow!!! That Works!! Thanks a lot!! &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Oct 2016 09:48:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Grouping-and-sorting/m-p/1192563#M385145</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-10-12T09:48:14Z</dc:date>
    </item>
    <item>
      <title>Re: Grouping and sorting</title>
      <link>https://community.qlik.com/t5/QlikView/Grouping-and-sorting/m-p/1192564#M385146</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Sunny!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just to add, in the real model, the scenario extends further where date is also same and product order is also same, in such a situation New Pdt description shows blanks, whereas it is required to pick the first occurrence. Can you please advice. Thanks a lot!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Oct 2016 09:55:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Grouping-and-sorting/m-p/1192564#M385146</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-10-12T09:55:48Z</dc:date>
    </item>
    <item>
      <title>Re: Grouping and sorting</title>
      <link>https://community.qlik.com/t5/QlikView/Grouping-and-sorting/m-p/1192565#M385147</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Table:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD &lt;SPAN style="color: #ff0000;"&gt;RowNo() as Key,&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; Market, &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Product, &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SubProduct, &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Product_Order, &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Pdt Valid From], &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Pdt_Description&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;FROM&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;SampleData.xls&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;(biff, embedded labels, table is Sheet1$);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Left Join (Table)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD Market,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; Product,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt; &lt;SPAN style="color: #ff0000;"&gt; FirstSortedValue(Pdt_Description, -([Pdt Valid From] - Product_Order/1000000 - Key/1000000000)) as New_Pdt_Description&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Resident Table&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Group By Market, Product;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Oct 2016 10:01:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Grouping-and-sorting/m-p/1192565#M385147</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-10-12T10:01:30Z</dc:date>
    </item>
    <item>
      <title>Re: Grouping and sorting</title>
      <link>https://community.qlik.com/t5/QlikView/Grouping-and-sorting/m-p/1192566#M385148</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Works just fine!! Thanks a lot!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Oct 2016 10:32:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Grouping-and-sorting/m-p/1192566#M385148</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-10-12T10:32:37Z</dc:date>
    </item>
  </channel>
</rss>

