<?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: Aggregate minimal date with minimal price problem! in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Aggregate-minimal-date-with-minimal-price-problem/m-p/695052#M1067949</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;set analysis won't work with this problem.&lt;/P&gt;&lt;P&gt;Use a formula like this&lt;/P&gt;&lt;P&gt;sum( if( aggr(nodistinct min(Date), Item) = Date, Price, 0))&lt;/P&gt;&lt;P&gt;within an chart with Item as dimension.&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 15 Sep 2014 09:02:27 GMT</pubDate>
    <dc:creator>martinpohl</dc:creator>
    <dc:date>2014-09-15T09:02:27Z</dc:date>
    <item>
      <title>Aggregate minimal date with minimal price problem!</title>
      <link>https://community.qlik.com/t5/QlikView/Aggregate-minimal-date-with-minimal-price-problem/m-p/695047#M1067944</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello guys, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have a little problem. I want to get the date when a person buyed a specific item with the MINIMAL price. The data looks like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" height="196" style="border: 1px solid #000000; width: 652px; height: 197px;" width="651"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;Item&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;Price&lt;/TH&gt;&lt;TH style="text-align: center; background-color: rgb(102, 144, 188); color: rgb(255, 255, 255); padding: 2px;" valign="middle"&gt;Date&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px; text-align: center;"&gt;x&lt;/TD&gt;&lt;TD style="padding: 2px; text-align: center;"&gt;12&lt;/TD&gt;&lt;TD style="padding: 2px; text-align: center;"&gt;12.01.2014&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px; text-align: center;"&gt;x&lt;/TD&gt;&lt;TD style="padding: 2px; text-align: center;"&gt;23&lt;/TD&gt;&lt;TD style="padding: 2px; text-align: center;"&gt;17.02.2014&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px; text-align: center;"&gt;x&lt;/TD&gt;&lt;TD style="padding: 2px; text-align: center;"&gt;45&lt;/TD&gt;&lt;TD style="padding: 2px; text-align: center;"&gt;16.03.2014&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px; text-align: center;"&gt;y&lt;/TD&gt;&lt;TD style="padding: 2px; text-align: center;"&gt;123&lt;/TD&gt;&lt;TD style="padding: 2px; text-align: center;"&gt;10.10.2005&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px; text-align: center;"&gt;y&lt;/TD&gt;&lt;TD style="padding: 2px; text-align: center;"&gt;123&lt;/TD&gt;&lt;TD style="padding: 2px; text-align: center;"&gt;20.12.2013&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px; text-align: center;"&gt;y&lt;/TD&gt;&lt;TD style="padding: 2px; text-align: center;"&gt;123&lt;/TD&gt;&lt;TD style="padding: 2px; text-align: center;"&gt;05.03.2012&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So i want to get that product x was bought with the minimal price on 12.01.2014 and product y on 10.10.2005.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've tried with the Firstsortedvalue() it works okay but when i put that date into set analysis -&amp;gt; Sum({&amp;lt;Date=(&amp;gt;=("FirstSortedValue(...)&amp;gt;} quantity) i get nothing...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So is there any solution to get that date during a script load ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jacek&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Sep 2014 08:06:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggregate-minimal-date-with-minimal-price-problem/m-p/695047#M1067944</guid>
      <dc:creator />
      <dc:date>2014-09-15T08:06:34Z</dc:date>
    </item>
    <item>
      <title>Re: Aggregate minimal date with minimal price problem!</title>
      <link>https://community.qlik.com/t5/QlikView/Aggregate-minimal-date-with-minimal-price-problem/m-p/695048#M1067945</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try like:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;=FirstSortedValue&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Aggr&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Price&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;),&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;), &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Sep 2014 08:17:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggregate-minimal-date-with-minimal-price-problem/m-p/695048#M1067945</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2014-09-15T08:17:59Z</dc:date>
    </item>
    <item>
      <title>Re: Aggregate minimal date with minimal price problem!</title>
      <link>https://community.qlik.com/t5/QlikView/Aggregate-minimal-date-with-minimal-price-problem/m-p/695049#M1067946</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I want to just get the min date when the product was bought with the min price &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Sep 2014 08:23:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggregate-minimal-date-with-minimal-price-problem/m-p/695049#M1067946</guid>
      <dc:creator />
      <dc:date>2014-09-15T08:23:12Z</dc:date>
    </item>
    <item>
      <title>Re: Aggregate minimal date with minimal price problem!</title>
      <link>https://community.qlik.com/t5/QlikView/Aggregate-minimal-date-with-minimal-price-problem/m-p/695050#M1067947</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&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;*,&lt;/P&gt;&lt;P&gt;If(Previous(Item) &amp;lt;&amp;gt; Item, 1, 0) AS LowestPriceFlag;&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;FROM DataSource&lt;/P&gt;&lt;P&gt;ORDER BY Item, Price, Date;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now LowestPriceFlag column has lowest date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In set analysis try like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dimension: Item&lt;/P&gt;&lt;P&gt;Expression : Only({&amp;lt;LowestPriceFlag={1}&amp;gt;} Date)&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>Mon, 15 Sep 2014 08:31:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggregate-minimal-date-with-minimal-price-problem/m-p/695050#M1067947</guid>
      <dc:creator>jagan</dc:creator>
      <dc:date>2014-09-15T08:31:13Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Aggregate minimal date with minimal price problem!</title>
      <link>https://community.qlik.com/t5/QlikView/Aggregate-minimal-date-with-minimal-price-problem/m-p/695051#M1067948</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It should be easier:&lt;/P&gt;&lt;P&gt;=FirstSortedValue(distinct Date, Price)&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;PFA&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Sep 2014 08:59:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggregate-minimal-date-with-minimal-price-problem/m-p/695051#M1067948</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2014-09-15T08:59:06Z</dc:date>
    </item>
    <item>
      <title>Re: Aggregate minimal date with minimal price problem!</title>
      <link>https://community.qlik.com/t5/QlikView/Aggregate-minimal-date-with-minimal-price-problem/m-p/695052#M1067949</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;set analysis won't work with this problem.&lt;/P&gt;&lt;P&gt;Use a formula like this&lt;/P&gt;&lt;P&gt;sum( if( aggr(nodistinct min(Date), Item) = Date, Price, 0))&lt;/P&gt;&lt;P&gt;within an chart with Item as dimension.&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Sep 2014 09:02:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggregate-minimal-date-with-minimal-price-problem/m-p/695052#M1067949</guid>
      <dc:creator>martinpohl</dc:creator>
      <dc:date>2014-09-15T09:02:27Z</dc:date>
    </item>
    <item>
      <title>Re: Aggregate minimal date with minimal price problem!</title>
      <link>https://community.qlik.com/t5/QlikView/Aggregate-minimal-date-with-minimal-price-problem/m-p/695053#M1067950</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;=Date(FirstSortedValue(Distinct Date, Price))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Sep 2014 09:34:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggregate-minimal-date-with-minimal-price-problem/m-p/695053#M1067950</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2014-09-15T09:34:49Z</dc:date>
    </item>
  </channel>
</rss>

