<?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: tangled with aggr, firstSortedValue ... in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/tangled-with-aggr-firstSortedValue/m-p/26290#M1792</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check now&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/192205_Capture.PNG" style="height: 128px; width: 620px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 01 Feb 2018 17:22:54 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2018-02-01T17:22:54Z</dc:date>
    <item>
      <title>tangled with aggr, firstSortedValue ...</title>
      <link>https://community.qlik.com/t5/App-Development/tangled-with-aggr-firstSortedValue/m-p/26287#M1789</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Need some help with expression.&lt;/P&gt;&lt;P&gt;I have a dataset of vendor price list in a form of following:&lt;/P&gt;&lt;P&gt;ItemId, Vendor, PriceDate, Price (whole dataset see below)&lt;/P&gt;&lt;P&gt;My app has one sheet and one table chart containing these four dimensions and some measures. They work fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm having a headake trying to make a last needed expression.&lt;/P&gt;&lt;P&gt;To define the best vendor price I need first to leave only records with Price &amp;gt; 0.&lt;/P&gt;&lt;P&gt;Then I sholud define last PriceDate by ItemId and Vendor. &lt;/P&gt;&lt;P&gt;Having done this I need to take min Price from all vendor prices and this Price is what i was looking for.&lt;/P&gt;&lt;P&gt;Of course I have to show in chart name of Vendor and PriceDate.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem is to make an expression showing PriceDate of the minimal vendor price, descripbed above.&lt;/P&gt;&lt;P&gt;In my test case the correct answer is:&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" width="356"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl65" height="20" width="88"&gt;ItemId&lt;/TD&gt;&lt;TD width="87"&gt;Vendor&lt;/TD&gt;&lt;TD width="108"&gt;TransDate&lt;/TD&gt;&lt;TD width="73"&gt;Price&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 356px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl64" height="20" width="88"&gt;A105&lt;/TD&gt;&lt;TD class="xl65" width="87"&gt;Orange Inc&lt;/TD&gt;&lt;TD align="right" class="xl66" width="108"&gt;2017-12-14&lt;/TD&gt;&lt;TD align="right" class="xl65" width="73"&gt;5.6&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 356px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl66" height="20" width="88"&gt;B230&lt;/TD&gt;&lt;TD class="xl67" width="87"&gt;Little U&lt;/TD&gt;&lt;TD align="right" class="xl68" width="108"&gt;2017-11-11&lt;/TD&gt;&lt;TD align="right" class="xl67" width="73"&gt;29.9&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The dataset:&lt;/P&gt;&lt;P&gt;Prices:&lt;/P&gt;&lt;P&gt;LOAD * INLINE [ItemId, Vendor, PriceDate, Price&lt;/P&gt;&lt;P&gt;'A105','Little U',2017-01-07,0&lt;/P&gt;&lt;P&gt;'B230','Little U',2017-11-11,29.9&lt;/P&gt;&lt;P&gt;'A105','Orange Inc',2017-02-01,6.6&lt;/P&gt;&lt;P&gt;'A105','Orange Inc',2017-03-02,7.5&lt;/P&gt;&lt;P&gt;'A105','Orange Inc',2017-03-13,4.4&lt;/P&gt;&lt;P&gt;'A105','Little U',2017-03-31,10.2&lt;/P&gt;&lt;P&gt;'A105','Little U',2017-08-09,5.1&lt;/P&gt;&lt;P&gt;'B230','Orange Inc',2017-04-16,0&lt;/P&gt;&lt;P&gt;'B230','Orange Inc',2017-05-05,31.1&lt;/P&gt;&lt;P&gt;'B230','Orange Inc',2017-05-08,40.2&lt;/P&gt;&lt;P&gt;'A105','Orange Inc',2017-09-17,5.5&lt;/P&gt;&lt;P&gt;'A105','Orange Inc',2017-10-11,4.9&lt;/P&gt;&lt;P&gt;'B230','Orange Inc',2017-08-07,30.5&lt;/P&gt;&lt;P&gt;'B230','Orange Inc',2017-08-15,35.5&lt;/P&gt;&lt;P&gt;'A105','Little U',2017-10-18,0&lt;/P&gt;&lt;P&gt;'B230','Little U',2017-05-08,0&lt;/P&gt;&lt;P&gt;'B230','Little U',2017-10-24,35.6&lt;/P&gt;&lt;P&gt;'B230','Little U',2017-06-30,0&lt;/P&gt;&lt;P&gt;'B230','Orange Inc',2017-09-19,35.5&lt;/P&gt;&lt;P&gt;'B230','Little U',2017-09-01,33.6&lt;/P&gt;&lt;P&gt;'A105','Orange Inc',2017-12-14,5.6&lt;/P&gt;&lt;P&gt;'B230','Orange Inc',2017-11-03,39.8&lt;/P&gt;&lt;P&gt;'B230','Little U',2017-09-25,0&lt;/P&gt;&lt;P&gt;'B230','Little U',2017-05-17,38.1&lt;/P&gt;&lt;P&gt;'B230','Orange Inc',2017-11-09,32.4&lt;/P&gt;&lt;P&gt;'A105','Little U',2017-12-25,11.5&lt;/P&gt;&lt;P&gt;'B230','Little U',2017-04-10,14.8&lt;/P&gt;&lt;P&gt;'B230','Orange Inc',2017-12-16,0&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Jan 2018 09:00:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/tangled-with-aggr-firstSortedValue/m-p/26287#M1789</guid>
      <dc:creator>demienyu</dc:creator>
      <dc:date>2018-01-31T09:00:40Z</dc:date>
    </item>
    <item>
      <title>Re: tangled with aggr, firstSortedValue ...</title>
      <link>https://community.qlik.com/t5/App-Development/tangled-with-aggr-firstSortedValue/m-p/26288#M1790</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check the attached&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/192040_Capture.PNG" style="height: 115px; width: 620px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Jan 2018 16:43:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/tangled-with-aggr-firstSortedValue/m-p/26288#M1790</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-01-31T16:43:49Z</dc:date>
    </item>
    <item>
      <title>Re: tangled with aggr, firstSortedValue ...</title>
      <link>https://community.qlik.com/t5/App-Development/tangled-with-aggr-firstSortedValue/m-p/26289#M1791</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If I remove Vendor from table qlik leaves only record with ItemId = B230&lt;/P&gt;&lt;P&gt;This is not correct. Both items should stay and result (Price and Date) should be the same.&lt;/P&gt;&lt;P&gt;I understand that it is quite a different task, but...&lt;/P&gt;&lt;P&gt;Anyway, what is the solution?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Feb 2018 11:00:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/tangled-with-aggr-firstSortedValue/m-p/26289#M1791</guid>
      <dc:creator>demienyu</dc:creator>
      <dc:date>2018-02-01T11:00:28Z</dc:date>
    </item>
    <item>
      <title>Re: tangled with aggr, firstSortedValue ...</title>
      <link>https://community.qlik.com/t5/App-Development/tangled-with-aggr-firstSortedValue/m-p/26290#M1792</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check now&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/192205_Capture.PNG" style="height: 128px; width: 620px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Feb 2018 17:22:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/tangled-with-aggr-firstSortedValue/m-p/26290#M1792</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-02-01T17:22:54Z</dc:date>
    </item>
  </channel>
</rss>

