<?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 How can use set analysis to find maximum sales and the date it occurred on in a straight table? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-can-use-set-analysis-to-find-maximum-sales-and-the-date-it/m-p/332339#M493336</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do you mean you want to display the Weekday name of the date that had the highest sales? Assuming the WeekDayname field already exists:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=FirstSortedValue(DISTINCT WeekDayname , -aggr(sum(NetSales), SalesDate, StoreName))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or is it something else you are looking for? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 31 May 2012 22:11:15 GMT</pubDate>
    <dc:creator>rwunderlich</dc:creator>
    <dc:date>2012-05-31T22:11:15Z</dc:date>
    <item>
      <title>How can use set analysis to find maximum sales and the date it occurred on in a straight table?</title>
      <link>https://community.qlik.com/t5/QlikView/How-can-use-set-analysis-to-find-maximum-sales-and-the-date-it/m-p/332336#M493333</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="background-color: #ffffff; font-size: 12px; color: #636363; font-family: Arial;"&gt;&lt;SPAN style="color: #000000;"&gt;Hello, everyone!&amp;nbsp; I'm trying to get the highest/max net sales for a day by location and then the sales/business date it occurred on.&amp;nbsp; The maximum Net Sales is working correctly, but I can't get it to pull in the SalesDate.&amp;nbsp; Here are the two expressions I'm using.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; font-size: 12px; color: #636363; font-family: Arial;"&gt;&lt;SPAN style="color: #000000;"&gt;//TO GET THE MAXIMUM OR HIGHEST SALES AMOUNT&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; font-size: 12px; color: #636363; font-family: Arial;"&gt;&lt;SPAN style="color: #000000;"&gt;max({$&amp;lt;SalesDate-={}&amp;gt;} NetSales)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; font-size: 12px; color: #636363; font-family: Arial;"&gt;&lt;SPAN style="color: #000000;"&gt;//TO GET THE SALES DATE THE MAXIMUM SALES AMOUNT OCCURED ON&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; font-size: 12px; color: #636363; font-family: Arial;"&gt;&lt;SPAN style="color: #000000;"&gt;max({$&amp;lt;NetSales={$(=max({$&amp;lt;SalesDate-={}&amp;gt;} NetSales))}&amp;gt;} SalesDate)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; font-size: 12px; color: #636363; font-family: Arial;"&gt;&lt;SPAN style="color: #000000;"&gt;I've tried several different set analysis formulas to get the date and I can't seem to figure it out.&amp;nbsp; Does it have something to do with the date field?&amp;nbsp; The date format being used in the load scipts/tables is MM/DD/YYYY&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; font-size: 12px; color: #636363; font-family: Arial;"&gt;&lt;SPAN style="color: #000000;"&gt;Also, as you can see, I am using &lt;SPAN style="text-decoration: underline;"&gt;StoreName as my only dimension&lt;/SPAN&gt; in this table.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; font-size: 12px; color: #636363; font-family: Arial;"&gt;&lt;SPAN style="color: #000000;"&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/servlet/JiveServlet/showImage/2-224225-15165/StraightTableResult.jpg" style="outline: none; color: #007fc0;"&gt;&lt;IMG alt="StraightTableResult.jpg" class="jive-image" height="200" src="https://community.qlik.com/legacyfs/online/15165_StraightTableResult.jpg" style="border: 0px; border-collapse: collapse;" width="364" /&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 May 2012 19:59:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-can-use-set-analysis-to-find-maximum-sales-and-the-date-it/m-p/332336#M493333</guid>
      <dc:creator>rluciano1012</dc:creator>
      <dc:date>2012-05-31T19:59:48Z</dc:date>
    </item>
    <item>
      <title>Re: How can use set analysis to find maximum sales and the date it occurred on in a straight table?</title>
      <link>https://community.qlik.com/t5/QlikView/How-can-use-set-analysis-to-find-maximum-sales-and-the-date-it/m-p/332337#M493334</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would solve it like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;=FirstSortedValue(DISTINCT SalesDate, -aggr(sum(NetSales), SalesDate, StoreName))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://robwunderlich.com"&gt;http://robwunderlich.com&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 May 2012 20:28:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-can-use-set-analysis-to-find-maximum-sales-and-the-date-it/m-p/332337#M493334</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2012-05-31T20:28:27Z</dc:date>
    </item>
    <item>
      <title>Re: How can use set analysis to find maximum sales and the date it occurred on in a straight table?</title>
      <link>https://community.qlik.com/t5/QlikView/How-can-use-set-analysis-to-find-maximum-sales-and-the-date-it/m-p/332338#M493335</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, Rob!  That worked great!  What if I also wanted to add another&lt;/P&gt;&lt;P&gt;expression the straight table to get the the maximum by day (i.e.&lt;/P&gt;&lt;P&gt; WeekDayName= 'Sat')  Can I add another field to the sort or do I have to&lt;/P&gt;&lt;P&gt;add it as a set analysis within that formula you wrote?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=FirstSortedValue(DISTINCT NetSales, -aggr(sum(NetSales), SalesDate,&lt;/P&gt;&lt;P&gt;StoreName))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ross&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On Thu, May 31, 2012 at 4:28 PM, Rob Wunderlich &amp;lt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 May 2012 21:26:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-can-use-set-analysis-to-find-maximum-sales-and-the-date-it/m-p/332338#M493335</guid>
      <dc:creator>rluciano1012</dc:creator>
      <dc:date>2012-05-31T21:26:11Z</dc:date>
    </item>
    <item>
      <title>How can use set analysis to find maximum sales and the date it occurred on in a straight table?</title>
      <link>https://community.qlik.com/t5/QlikView/How-can-use-set-analysis-to-find-maximum-sales-and-the-date-it/m-p/332339#M493336</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do you mean you want to display the Weekday name of the date that had the highest sales? Assuming the WeekDayname field already exists:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=FirstSortedValue(DISTINCT WeekDayname , -aggr(sum(NetSales), SalesDate, StoreName))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or is it something else you are looking for? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 May 2012 22:11:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-can-use-set-analysis-to-find-maximum-sales-and-the-date-it/m-p/332339#M493336</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2012-05-31T22:11:15Z</dc:date>
    </item>
  </channel>
</rss>

