<?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: How to consider max sales by comparing with two fields in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-consider-max-sales-by-comparing-with-two-fields/m-p/81148#M13333</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your great support Prashanth,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I did with this script but its separated all the records. Please find the attached QVW which i have done.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 12 Jun 2018 06:07:30 GMT</pubDate>
    <dc:creator>rkpatelqlikview</dc:creator>
    <dc:date>2018-06-12T06:07:30Z</dc:date>
    <item>
      <title>How to consider max sales by comparing with two fields</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-consider-max-sales-by-comparing-with-two-fields/m-p/81140#M13325</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Experts,&lt;/P&gt;&lt;P&gt;Can anyone p&lt;SPAN style="font-size: 10pt;"&gt;lease suggest on this?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I do have below fields. Here i need to consider the sales based on the CheckID and PID but here PID will get duplicates and checkID unique numbers. At this situation we need to consider the only one sales which is highest number.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below example:&lt;/P&gt;&lt;P&gt;Store ID : AP345, Check ID are 3 distinct numbers, PID are duplicates. Here the final sales should be 675, which is highest sales.&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;BR /&gt;&lt;IMG alt="Sales121.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/204763_Sales121.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Jun 2018 05:23:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-consider-max-sales-by-comparing-with-two-fields/m-p/81140#M13325</guid>
      <dc:creator>rkpatelqlikview</dc:creator>
      <dc:date>2018-06-11T05:23:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to consider max sales by comparing with two fields</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-consider-max-sales-by-comparing-with-two-fields/m-p/81141#M13326</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kumar&lt;SPAN style="font-size: 10pt;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use below expression in your Set Analysis.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Sum(Aggr(Max(Sales),StoreID&amp;amp;PID))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Sumeet&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Jun 2018 06:50:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-consider-max-sales-by-comparing-with-two-fields/m-p/81141#M13326</guid>
      <dc:creator>sumeet-vaidya</dc:creator>
      <dc:date>2018-06-11T06:50:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to consider max sales by comparing with two fields</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-consider-max-sales-by-comparing-with-two-fields/m-p/81142#M13327</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Sumeet,&lt;/P&gt;&lt;P&gt;Can i get this in the back end? I need to do this in script level it self. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Jun 2018 08:09:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-consider-max-sales-by-comparing-with-two-fields/m-p/81142#M13327</guid>
      <dc:creator>rkpatelqlikview</dc:creator>
      <dc:date>2018-06-11T08:09:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to consider max sales by comparing with two fields</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-consider-max-sales-by-comparing-with-two-fields/m-p/81143#M13328</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;what if there date and storeID was different then in such case what you want??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;load * from table;&lt;/P&gt;&lt;P&gt;Left Join &lt;/P&gt;&lt;P&gt;load pid,max(Sales) as max_Sales from table&lt;/P&gt;&lt;P&gt;group by pid;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards, &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Jun 2018 08:46:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-consider-max-sales-by-comparing-with-two-fields/m-p/81143#M13328</guid>
      <dc:creator>PrashantSangle</dc:creator>
      <dc:date>2018-06-11T08:46:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to consider max sales by comparing with two fields</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-consider-max-sales-by-comparing-with-two-fields/m-p/81144#M13329</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your response Prashanth,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If there date and storeID are different at that time the PID never get the duplicates.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Jun 2018 10:00:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-consider-max-sales-by-comparing-with-two-fields/m-p/81144#M13329</guid>
      <dc:creator>rkpatelqlikview</dc:creator>
      <dc:date>2018-06-11T10:00:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to consider max sales by comparing with two fields</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-consider-max-sales-by-comparing-with-two-fields/m-p/81145#M13330</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Excellent Prashanth,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It's working properly. Here i do not want to consider the remaining sales. I need to remove those records&amp;nbsp; from that column which are not highest number.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Jun 2018 10:08:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-consider-max-sales-by-comparing-with-two-fields/m-p/81145#M13330</guid>
      <dc:creator>rkpatelqlikview</dc:creator>
      <dc:date>2018-06-11T10:08:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to consider max sales by comparing with two fields</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-consider-max-sales-by-comparing-with-two-fields/m-p/81146#M13331</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 13.3333px;"&gt;Dear Prashanth,&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Can i remove the records where the numbers are not highest?&lt;/P&gt;&lt;P&gt;I want to remove this marked records. Can you please suggest on this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="1111.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/204881_1111.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jun 2018 03:48:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-consider-max-sales-by-comparing-with-two-fields/m-p/81146#M13331</guid>
      <dc:creator>rkpatelqlikview</dc:creator>
      <dc:date>2018-06-12T03:48:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to consider max sales by comparing with two fields</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-consider-max-sales-by-comparing-with-two-fields/m-p/81147#M13332</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes you can after left join you can take resident of that table add new condition into it like&lt;/P&gt;&lt;P&gt;if(Sales=maxSales,1,0) as flag;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then use only those data which flag is 1 in front end.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also if you want to remove those record in back end then again take Resident of new table and use where clause &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;like where flag=1;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jun 2018 05:18:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-consider-max-sales-by-comparing-with-two-fields/m-p/81147#M13332</guid>
      <dc:creator>PrashantSangle</dc:creator>
      <dc:date>2018-06-12T05:18:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to consider max sales by comparing with two fields</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-consider-max-sales-by-comparing-with-two-fields/m-p/81148#M13333</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your great support Prashanth,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I did with this script but its separated all the records. Please find the attached QVW which i have done.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jun 2018 06:07:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-consider-max-sales-by-comparing-with-two-fields/m-p/81148#M13333</guid>
      <dc:creator>rkpatelqlikview</dc:creator>
      <dc:date>2018-06-12T06:07:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to consider max sales by comparing with two fields</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-consider-max-sales-by-comparing-with-two-fields/m-p/81149#M13334</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;update below code and try&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;T1:&lt;/P&gt;&lt;P&gt;LOAD &lt;/P&gt;&lt;P&gt;Date,&lt;/P&gt;&lt;P&gt;StoreID, &lt;/P&gt;&lt;P&gt;CheckID, &lt;/P&gt;&lt;P&gt;PID, &lt;/P&gt;&lt;P&gt;Sales&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;&lt;D&gt;&lt;/D&gt;&lt;/P&gt;&lt;P&gt;(ooxml, embedded labels, table is Sheet1);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Left Join&lt;/P&gt;&lt;P&gt;Load &lt;/P&gt;&lt;P&gt;PID,&lt;/P&gt;&lt;P&gt;Max(Sales) as Maxsales Resident T1 Group by PID;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NoConcatenate&lt;/P&gt;&lt;P&gt;Final:&lt;/P&gt;&lt;P&gt;Load &lt;/P&gt;&lt;P&gt;*,&lt;/P&gt;&lt;P&gt;if(Sales=Maxsales,1,0) as flag Resident T1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DROP table T1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jun 2018 06:39:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-consider-max-sales-by-comparing-with-two-fields/m-p/81149#M13334</guid>
      <dc:creator>PrashantSangle</dc:creator>
      <dc:date>2018-06-12T06:39:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to consider max sales by comparing with two fields</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-consider-max-sales-by-comparing-with-two-fields/m-p/81150#M13335</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Prashanth,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It's correct. &lt;/P&gt;&lt;P&gt;I used below one to get the maximum sales. Thanks again.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Final:&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;*,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;if(Sales=Maxsales,1,0) as flag Resident T1 where if(Sales=Maxsales,1,0) =1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regard.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jun 2018 08:52:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-consider-max-sales-by-comparing-with-two-fields/m-p/81150#M13335</guid>
      <dc:creator>rkpatelqlikview</dc:creator>
      <dc:date>2018-06-12T08:52:01Z</dc:date>
    </item>
  </channel>
</rss>

