<?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: Last Row VALUE based on Distinct fields in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Last-Row-VALUE-based-on-Distinct-fields-Similar-to-quot-select/m-p/1566105#M41269</link>
    <description>&lt;P&gt;The image rows are blur, Could you please specify the few rows and expected one?&lt;/P&gt;</description>
    <pubDate>Sun, 07 Apr 2019 12:58:11 GMT</pubDate>
    <dc:creator>Anil_Babu_Samineni</dc:creator>
    <dc:date>2019-04-07T12:58:11Z</dc:date>
    <item>
      <title>Last Row VALUE based on Distinct fields - Similar to "select distinct on (filed1,filed2)"   SQLQuery</title>
      <link>https://community.qlik.com/t5/App-Development/Last-Row-VALUE-based-on-Distinct-fields-Similar-to-quot-select/m-p/1566100#M41268</link>
      <description>&lt;P&gt;Hello, Guys Hope you all doing well,&lt;/P&gt;&lt;P&gt;I have a problem with the sum of&amp;nbsp; stock quantities&lt;/P&gt;&lt;P&gt;first of all, here is the header of the main columns in the fact table "Stock Quantity "&lt;/P&gt;&lt;P&gt;"FQST_Stock_Id" , "ENT_Entreprise_Id", "STR_Magasin_Id", "PRD_Produit_Id","EMPL_Emplacement_Id","FQST_Date_Stock" and "FQST_Quantite_Produit", "FQST_Prix_Public"&lt;/P&gt;&lt;P&gt;I want to have the stock value at a selected date for all the products at any enterprise any emplacement (location) and any magazine(store)&lt;/P&gt;&lt;P&gt;I have made this set analysis expression however it gives me just the sum of&amp;nbsp; last date (max date):&lt;/P&gt;&lt;P&gt;Sum({&amp;lt;date={"$(=max(FQST_Date_Stock))"},[TypeDate]={'DateStock'},[FQST_Type]={'StockInterne'}&amp;gt;}&lt;BR /&gt;FQST_Quantite_Produit*FQST_Prix_Unitaire_Quant)&lt;/P&gt;&lt;P&gt;the picture joined with the question may explain more by default and without selecting any date&lt;/P&gt;&lt;P&gt;the result of the measure is the sum of rows in green based on a distinct value of the fields in yellow we get the sum of last values&amp;nbsp; &lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="CaptureQlikCommunity.PNG" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/9645iC9AFF62C3D26D473/image-size/medium?v=v2&amp;amp;px=400" role="button" title="CaptureQlikCommunity.PNG" alt="CaptureQlikCommunity.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;so if you may help me to get the stock value by fetching the last distinct value of a row composed of the&amp;nbsp; filed mentioned above&amp;nbsp;&lt;/P&gt;&lt;P&gt;PS: it is near in meaning to the SQL instruction "Distinct On"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and it is the result of this SQL query&lt;/P&gt;&lt;P&gt;select * from&lt;/P&gt;&lt;P&gt;(&lt;EM&gt;&lt;STRONG&gt;SELECT DISTINCT ON&lt;/STRONG&gt;&lt;/EM&gt; ("&lt;EM&gt;ENT_Entreprise_Id&lt;/EM&gt;", "&lt;EM&gt;STR_Magasin_Id&lt;/EM&gt;","&lt;EM&gt;PRD_Produit_Id&lt;/EM&gt;", "&lt;EM&gt;EMPL_Emplacement_Id&lt;/EM&gt;")&amp;nbsp; t1.*&lt;/P&gt;&lt;P&gt;FROM "BI"."Test"&amp;nbsp; t1&lt;/P&gt;&lt;P&gt;order by "PRD_Produit_Id", "EMPL_Emplacement_Id","ENT_Entreprise_Id","STR_Magasin_Id",&amp;nbsp;&lt;/P&gt;&lt;P&gt;"FQST_Date_Stock" DESC&lt;/P&gt;&lt;P&gt;)t&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;order by "FQST_Date_Stock" DESC&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 21:06:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Last-Row-VALUE-based-on-Distinct-fields-Similar-to-quot-select/m-p/1566100#M41268</guid>
      <dc:creator>faroukfrk</dc:creator>
      <dc:date>2024-11-16T21:06:16Z</dc:date>
    </item>
    <item>
      <title>Re: Last Row VALUE based on Distinct fields</title>
      <link>https://community.qlik.com/t5/App-Development/Last-Row-VALUE-based-on-Distinct-fields-Similar-to-quot-select/m-p/1566105#M41269</link>
      <description>&lt;P&gt;The image rows are blur, Could you please specify the few rows and expected one?&lt;/P&gt;</description>
      <pubDate>Sun, 07 Apr 2019 12:58:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Last-Row-VALUE-based-on-Distinct-fields-Similar-to-quot-select/m-p/1566105#M41269</guid>
      <dc:creator>Anil_Babu_Samineni</dc:creator>
      <dc:date>2019-04-07T12:58:11Z</dc:date>
    </item>
    <item>
      <title>Re: Last Row VALUE based on Distinct fields</title>
      <link>https://community.qlik.com/t5/App-Development/Last-Row-VALUE-based-on-Distinct-fields-Similar-to-quot-select/m-p/1566124#M41273</link>
      <description>&lt;P&gt;the first table is the input and the green colored rows in the second table are the output&lt;/P&gt;&lt;P&gt;You may zoom on the picture to see it&amp;nbsp; clearly &lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/5533"&gt;@Anil_Babu_Samineni&lt;/a&gt;&lt;/P&gt;&lt;P&gt;you may also take a look at the SQL Query i added at the end it gives the result i want to have&lt;/P&gt;</description>
      <pubDate>Sun, 07 Apr 2019 16:41:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Last-Row-VALUE-based-on-Distinct-fields-Similar-to-quot-select/m-p/1566124#M41273</guid>
      <dc:creator>faroukfrk</dc:creator>
      <dc:date>2019-04-07T16:41:57Z</dc:date>
    </item>
    <item>
      <title>Re: Last Row VALUE based on Distinct fields</title>
      <link>https://community.qlik.com/t5/App-Development/Last-Row-VALUE-based-on-Distinct-fields-Similar-to-quot-select/m-p/1566226#M41279</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/12989"&gt;@Michael_Tarallo&lt;/a&gt;&amp;nbsp; do you have any idea ?!&lt;/P&gt;&lt;P&gt;how to make a "select distinct on (filed1,filed2)" withing qlik sense using chart functions&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Apr 2019 07:45:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Last-Row-VALUE-based-on-Distinct-fields-Similar-to-quot-select/m-p/1566226#M41279</guid>
      <dc:creator>faroukfrk</dc:creator>
      <dc:date>2019-04-08T07:45:11Z</dc:date>
    </item>
  </channel>
</rss>

