<?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: Script Issue with MAX function in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Script-Issue-with-MAX-function/m-p/465158#M486189</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try like this in script&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Products:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; *,&lt;/P&gt;&lt;P&gt;WHERE IsLatestProduct = 1;&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ProductID, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ProductDetailID,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(ProductID &amp;lt;&amp;gt; Previous(ProductID), 1, 0) AS IsLatestProduct&lt;/P&gt;&lt;P&gt;FROM DataSource&lt;/P&gt;&lt;P&gt;ORDER BY ProductID, ProductDetailID DESC;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jagan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 18 Apr 2013 06:07:46 GMT</pubDate>
    <dc:creator>jagan</dc:creator>
    <dc:date>2013-04-18T06:07:46Z</dc:date>
    <item>
      <title>Script Issue with MAX function</title>
      <link>https://community.qlik.com/t5/QlikView/Script-Issue-with-MAX-function/m-p/465154#M486185</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Hello all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm new to Qlikview.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a situation like i got 100 million product details.&lt;/P&gt;&lt;P&gt;where productID will be unique but when ever the details changes we will have a new productdetailID.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have to pick a latest one.&lt;/P&gt;&lt;P&gt;&amp;amp; My table have only ProductID &amp;amp; ProductDetailID fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when i'm using MAX function &amp;amp; grouping by ProductID.&lt;/P&gt;&lt;P&gt;I'm getting an invalid expression in script.&lt;/P&gt;&lt;P&gt;I tried MAXNUM which didn't worked.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone help me with this issue please.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks a lot to you all.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Apr 2013 22:57:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Script-Issue-with-MAX-function/m-p/465154#M486185</guid>
      <dc:creator />
      <dc:date>2013-04-17T22:57:03Z</dc:date>
    </item>
    <item>
      <title>Re: Script Issue with MAX function</title>
      <link>https://community.qlik.com/t5/QlikView/Script-Issue-with-MAX-function/m-p/465155#M486186</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try with FirstSortedValue() function&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #737373; font-family: Arial; font-size: 12.727272033691406px; background-color: #ffffff;"&gt;group by ProductID&lt;/SPAN&gt; desc; // can able to use &lt;SPAN style="color: #737373; font-family: Arial; font-size: 12.727272033691406px; background-color: #ffffff;"&gt;group by createdon desc;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #737373; font-family: Arial; font-size: 12.727272033691406px; background-color: #ffffff;"&gt;hope it helps&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Apr 2013 23:09:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Script-Issue-with-MAX-function/m-p/465155#M486186</guid>
      <dc:creator>MayilVahanan</dc:creator>
      <dc:date>2013-04-17T23:09:55Z</dc:date>
    </item>
    <item>
      <title>Re: Script Issue with MAX function</title>
      <link>https://community.qlik.com/t5/QlikView/Script-Issue-with-MAX-function/m-p/465156#M486187</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mayil Vahanan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tried using firstsortedvalue(ProductdetailID,ProductID)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;which gave me same error as&lt;/P&gt;&lt;P&gt;" Invalid Expression ".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tried max(productdetailID)&lt;/P&gt;&lt;P&gt;group by productID.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;which gave me same error stating.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"Invalid Expression "&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Apr 2013 23:13:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Script-Issue-with-MAX-function/m-p/465156#M486187</guid>
      <dc:creator />
      <dc:date>2013-04-17T23:13:31Z</dc:date>
    </item>
    <item>
      <title>Re: Script Issue with MAX function</title>
      <link>https://community.qlik.com/t5/QlikView/Script-Issue-with-MAX-function/m-p/465157#M486188</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If &lt;SPAN class="hps"&gt;ProductdetailID&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;is a text.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="hps"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Tried using MaxString() function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD ProductID, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MaxString(ProductdetailID) as ProductdetailID&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;maxProduct.xlsx(ooxml, embedded labels, table is Sheet1)&lt;/P&gt;&lt;P&gt;group by ProductID;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope it helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Apr 2013 05:25:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Script-Issue-with-MAX-function/m-p/465157#M486188</guid>
      <dc:creator />
      <dc:date>2013-04-18T05:25:40Z</dc:date>
    </item>
    <item>
      <title>Re: Script Issue with MAX function</title>
      <link>https://community.qlik.com/t5/QlikView/Script-Issue-with-MAX-function/m-p/465158#M486189</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try like this in script&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Products:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; *,&lt;/P&gt;&lt;P&gt;WHERE IsLatestProduct = 1;&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ProductID, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ProductDetailID,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(ProductID &amp;lt;&amp;gt; Previous(ProductID), 1, 0) AS IsLatestProduct&lt;/P&gt;&lt;P&gt;FROM DataSource&lt;/P&gt;&lt;P&gt;ORDER BY ProductID, ProductDetailID DESC;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jagan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Apr 2013 06:07:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Script-Issue-with-MAX-function/m-p/465158#M486189</guid>
      <dc:creator>jagan</dc:creator>
      <dc:date>2013-04-18T06:07:46Z</dc:date>
    </item>
  </channel>
</rss>

