<?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: Min Date based on Sum amount in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Min-Date-based-on-Sum-amount/m-p/1978646#M80784</link>
    <description>&lt;P&gt;&lt;A id="link_12" class="lia-link-navigation lia-page-link lia-user-name-link" href="https://community.qlik.com/t5/user/viewprofilepage/user-id/54602" target="_self" aria-label="View Profile of oskartoivonen" aria-describedby="userProfileCard-54602"&gt;&lt;SPAN class=""&gt;oskartoivonen &lt;/SPAN&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class=""&gt;thanks for you reply.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Here the idea is to aggregate the value at each date level, then show which date has Min and Max value.&lt;/P&gt;
&lt;P&gt;I have tried your suggestion and my set expression as follow,&lt;/P&gt;
&lt;P&gt;FirstSortedValue(AGGR(Sum(Value),Date),Date)&lt;/P&gt;
&lt;P&gt;This is not giving the results. Correct me if anything wrong here&lt;/P&gt;</description>
    <pubDate>Thu, 08 Sep 2022 11:50:35 GMT</pubDate>
    <dc:creator>muthukumarbalu91</dc:creator>
    <dc:date>2022-09-08T11:50:35Z</dc:date>
    <item>
      <title>Min Date based on Sum amount</title>
      <link>https://community.qlik.com/t5/App-Development/Min-Date-based-on-Sum-amount/m-p/1978597#M80778</link>
      <description>&lt;P&gt;Hi Team,&lt;/P&gt;
&lt;P&gt;I have data as below,&lt;/P&gt;
&lt;TABLE style="border-collapse: collapse; width: 144pt;" border="0" width="192" cellspacing="0" cellpadding="0"&gt;
&lt;TBODY&gt;
&lt;TR style="height: 14.5pt;"&gt;
&lt;TD width="64" height="19" class="xl65" style="height: 14.5pt; width: 48pt;"&gt;Date&lt;/TD&gt;
&lt;TD width="64" class="xl65" style="border-left: none; width: 48pt;"&gt;Row&lt;/TD&gt;
&lt;TD width="64" class="xl65" style="border-left: none; width: 48pt;"&gt;Value&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 14.5pt;"&gt;
&lt;TD height="19" align="right" class="xl64" style="height: 14.5pt; border-top: none;"&gt;1/1/2022&lt;/TD&gt;
&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;
&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;10&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 14.5pt;"&gt;
&lt;TD height="19" align="right" class="xl64" style="height: 14.5pt; border-top: none;"&gt;1/1/2022&lt;/TD&gt;
&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;2&lt;/TD&gt;
&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;23&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 14.5pt;"&gt;
&lt;TD height="19" align="right" class="xl64" style="height: 14.5pt; border-top: none;"&gt;1/1/2022&lt;/TD&gt;
&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;3&lt;/TD&gt;
&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;45&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 14.5pt;"&gt;
&lt;TD height="19" align="right" class="xl64" style="height: 14.5pt; border-top: none;"&gt;1/1/2022&lt;/TD&gt;
&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;4&lt;/TD&gt;
&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;576&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 14.5pt;"&gt;
&lt;TD height="19" align="right" class="xl64" style="height: 14.5pt; border-top: none;"&gt;1/1/2022&lt;/TD&gt;
&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;2&lt;/TD&gt;
&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;23&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 14.5pt;"&gt;
&lt;TD height="19" align="right" class="xl64" style="height: 14.5pt; border-top: none;"&gt;1/1/2022&lt;/TD&gt;
&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;5&lt;/TD&gt;
&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;67&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 14.5pt;"&gt;
&lt;TD height="19" align="right" class="xl64" style="height: 14.5pt; border-top: none;"&gt;2/1/2022&lt;/TD&gt;
&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;
&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 14.5pt;"&gt;
&lt;TD height="19" align="right" class="xl64" style="height: 14.5pt; border-top: none;"&gt;2/1/2022&lt;/TD&gt;
&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;2&lt;/TD&gt;
&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;5&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 14.5pt;"&gt;
&lt;TD height="19" align="right" class="xl64" style="height: 14.5pt; border-top: none;"&gt;2/1/2022&lt;/TD&gt;
&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;3&lt;/TD&gt;
&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;6&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 14.5pt;"&gt;
&lt;TD height="19" align="right" class="xl64" style="height: 14.5pt; border-top: none;"&gt;2/1/2022&lt;/TD&gt;
&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;4&lt;/TD&gt;
&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;4&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 14.5pt;"&gt;
&lt;TD height="19" align="right" class="xl64" style="height: 14.5pt; border-top: none;"&gt;2/1/2022&lt;/TD&gt;
&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;2&lt;/TD&gt;
&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;90&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 14.5pt;"&gt;
&lt;TD height="19" align="right" class="xl64" style="height: 14.5pt; border-top: none;"&gt;2/1/2022&lt;/TD&gt;
&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;5&lt;/TD&gt;
&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;98&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 14.5pt;"&gt;
&lt;TD height="19" align="right" class="xl64" style="height: 14.5pt; border-top: none;"&gt;3/1/2022&lt;/TD&gt;
&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;
&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;566&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 14.5pt;"&gt;
&lt;TD height="19" align="right" class="xl64" style="height: 14.5pt; border-top: none;"&gt;3/1/2022&lt;/TD&gt;
&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;2&lt;/TD&gt;
&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;343&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 14.5pt;"&gt;
&lt;TD height="19" align="right" class="xl64" style="height: 14.5pt; border-top: none;"&gt;3/1/2022&lt;/TD&gt;
&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;3&lt;/TD&gt;
&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;32&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 14.5pt;"&gt;
&lt;TD height="19" align="right" class="xl64" style="height: 14.5pt; border-top: none;"&gt;3/1/2022&lt;/TD&gt;
&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;4&lt;/TD&gt;
&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;23&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 14.5pt;"&gt;
&lt;TD height="19" align="right" class="xl64" style="height: 14.5pt; border-top: none;"&gt;3/1/2022&lt;/TD&gt;
&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;2&lt;/TD&gt;
&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;54&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 14.5pt;"&gt;
&lt;TD height="19" align="right" class="xl64" style="height: 14.5pt; border-top: none;"&gt;3/1/2022&lt;/TD&gt;
&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;5&lt;/TD&gt;
&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;6&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;expected output from QS is Sum(Value) which is MIN and MAX as below,&lt;/P&gt;
&lt;TABLE width="248"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="93"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="64"&gt;Date&lt;/TD&gt;
&lt;TD width="91"&gt;Value&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;MinValueDate&lt;/TD&gt;
&lt;TD&gt;2/1/2022&lt;/TD&gt;
&lt;TD&gt;204&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;MaxValueDate&lt;/TD&gt;
&lt;TD&gt;3/1/2022&lt;/TD&gt;
&lt;TD&gt;1972&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How to achieve it in Qlik, Please throw some ideas.&lt;/P&gt;
&lt;P&gt;thanks in advance&lt;/P&gt;
&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/46628"&gt;@sunny_talwar&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Sep 2022 10:44:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Min-Date-based-on-Sum-amount/m-p/1978597#M80778</guid>
      <dc:creator>muthukumarbalu91</dc:creator>
      <dc:date>2022-09-08T10:44:48Z</dc:date>
    </item>
    <item>
      <title>Re: Min Date based on Sum amount</title>
      <link>https://community.qlik.com/t5/App-Development/Min-Date-based-on-Sum-amount/m-p/1978603#M80781</link>
      <description>&lt;P&gt;Your example doesn't seem to be logical, if the idea is to locate which date had the smallest value and which date had the max value, then MinValueDate should be 2.1.2022 (value = 1) and MaxValueDate should be 1.1.2022 (value = 576).&lt;/P&gt;
&lt;P&gt;But to do this in practice, you should use the aggregation function FirstSortedValue. Ask FirstSortedValue for a date and sort the data by value, the sorting direction can be reversed to get min and max dates respectively.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Sep 2022 10:35:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Min-Date-based-on-Sum-amount/m-p/1978603#M80781</guid>
      <dc:creator>oskartoivonen</dc:creator>
      <dc:date>2022-09-08T10:35:01Z</dc:date>
    </item>
    <item>
      <title>Re: Min Date based on Sum amount</title>
      <link>https://community.qlik.com/t5/App-Development/Min-Date-based-on-Sum-amount/m-p/1978646#M80784</link>
      <description>&lt;P&gt;&lt;A id="link_12" class="lia-link-navigation lia-page-link lia-user-name-link" href="https://community.qlik.com/t5/user/viewprofilepage/user-id/54602" target="_self" aria-label="View Profile of oskartoivonen" aria-describedby="userProfileCard-54602"&gt;&lt;SPAN class=""&gt;oskartoivonen &lt;/SPAN&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class=""&gt;thanks for you reply.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Here the idea is to aggregate the value at each date level, then show which date has Min and Max value.&lt;/P&gt;
&lt;P&gt;I have tried your suggestion and my set expression as follow,&lt;/P&gt;
&lt;P&gt;FirstSortedValue(AGGR(Sum(Value),Date),Date)&lt;/P&gt;
&lt;P&gt;This is not giving the results. Correct me if anything wrong here&lt;/P&gt;</description>
      <pubDate>Thu, 08 Sep 2022 11:50:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Min-Date-based-on-Sum-amount/m-p/1978646#M80784</guid>
      <dc:creator>muthukumarbalu91</dc:creator>
      <dc:date>2022-09-08T11:50:35Z</dc:date>
    </item>
    <item>
      <title>Re: Min Date based on Sum amount</title>
      <link>https://community.qlik.com/t5/App-Development/Min-Date-based-on-Sum-amount/m-p/1978672#M80785</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/197172"&gt;@muthukumarbalu91&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;You were almost there.&lt;/P&gt;
&lt;P&gt;The function first takes the field you want and then the sorting method. (write in the help.qlik.com)&lt;/P&gt;
&lt;P&gt;So your expression for min is :&amp;nbsp;&lt;EM&gt;FirstSortedValue(Date,AGGR(Sum(Value),Date))&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;And max is : &lt;EM&gt;FirstSortedValue(Date,-AGGR(Sum(Value),Date))&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Sep 2022 12:32:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Min-Date-based-on-Sum-amount/m-p/1978672#M80785</guid>
      <dc:creator>Pierrick</dc:creator>
      <dc:date>2022-09-08T12:32:31Z</dc:date>
    </item>
  </channel>
</rss>

