<?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: Complex dynamic computation of value based on selection in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/How-to-use-Complex-dynamic-computation-of-value-based-on/m-p/1881200#M72609</link>
    <description>&lt;P&gt;It works if all products have the same last date, but not if they don't, e.g. if product A has a last date of 01-02-2021, but B and C have a last date of 01-03-2021, you don't get a latest value for B:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="rbartley_0-1642175055054.png" style="width: 963px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/70261iECF02F110BAC1091/image-dimensions/963x297?v=v2" width="963" height="297" role="button" title="rbartley_0-1642175055054.png" alt="rbartley_0-1642175055054.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 14 Jan 2022 15:45:05 GMT</pubDate>
    <dc:creator>rbartley</dc:creator>
    <dc:date>2022-01-14T15:45:05Z</dc:date>
    <item>
      <title>How to use Complex dynamic computation of value based on selection in Qlik Sense?</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-use-Complex-dynamic-computation-of-value-based-on/m-p/1880569#M72571</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I have a table like this&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Schermata 2022-01-13 alle 11.08.46.png" style="width: 222px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/70135iE96221DB6E7EF662/image-dimensions/222x196?v=v2" width="222" height="196" role="button" title="Schermata 2022-01-13 alle 11.08.46.png" alt="Schermata 2022-01-13 alle 11.08.46.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Now, consider that the user can select a period of time. I want to add a column where there must be the most recent available cost per product. So, for example, if the user select Feb21 and March21, the table should be like the following.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Schermata 2022-01-13 alle 11.12.11.png" style="width: 241px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/70136i59C6D05FD39A626D/image-dimensions/241x110?v=v2" width="241" height="110" role="button" title="Schermata 2022-01-13 alle 11.12.11.png" alt="Schermata 2022-01-13 alle 11.12.11.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I tried to compute lastCost using a set analysis where I tried to select the cost corresponding to max(time) per each product, but this is not ok because this automatically filter the table, leaving only the rows corresponding to max time, per product.&lt;/P&gt;
&lt;P&gt;I need lastCost to build also some charts, using this cost to compute costs based on the most recent cost. I cannot do this in the etl because the most recent cost changes depending on the period selected by the user.&lt;/P&gt;
&lt;P&gt;How could I accomplish such task?&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 02 Nov 2022 19:54:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-use-Complex-dynamic-computation-of-value-based-on/m-p/1880569#M72571</guid>
      <dc:creator>danette</dc:creator>
      <dc:date>2022-11-02T19:54:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to use Complex dynamic computation of value based on selection in Qlik Sense?</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-use-Complex-dynamic-computation-of-value-based-on/m-p/1881047#M72596</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;My preference would be to add the "last cost flag" field in your load script and then just use that in the set analysis, e.g.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;=Sum({&amp;lt;"last cost flag"={1}&amp;gt;}cost)&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 02 Nov 2022 19:55:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-use-Complex-dynamic-computation-of-value-based-on/m-p/1881047#M72596</guid>
      <dc:creator>rbartley</dc:creator>
      <dc:date>2022-11-02T19:55:24Z</dc:date>
    </item>
    <item>
      <title>Re: Complex dynamic computation of value based on selection</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-use-Complex-dynamic-computation-of-value-based-on/m-p/1881051#M72598</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;last cost varies depending on the period that is selected by the user, so it cannot be pre-determined inside the load script. I don't need the absolute last cost, but the last cost based on the selection.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jan 2022 09:04:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-use-Complex-dynamic-computation-of-value-based-on/m-p/1881051#M72598</guid>
      <dc:creator>danette</dc:creator>
      <dc:date>2022-01-14T09:04:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to use Complex dynamic computation of value based on selection in Qlik Sense?</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-use-Complex-dynamic-computation-of-value-based-on/m-p/1881056#M72599</link>
      <description>&lt;P&gt;This would help you to achieve the desired result.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;LOAD *, DATE#(Time,'DD-MM-YYYY') AS DATEFORMAT;
Load * inline [
Product ,Time , Cost
A,01-01-2021,1
A,01-02-2021,2
A,01-03-2021,4
B,01-01-2021,5
B,01-03-2021,3
C,01-03-2021,6
C,01-02-2021,7
C,01-01-2021,8

];

Expression:

Sum(Total &amp;lt;Product&amp;gt; {&amp;lt;DATEFORMAT={"$(=DATE(MAX(DATEFORMAT),'DD-MM-YYYY'))"}&amp;gt;}Cost)&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 02 Nov 2022 19:55:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-use-Complex-dynamic-computation-of-value-based-on/m-p/1881056#M72599</guid>
      <dc:creator>Scotlyvictor</dc:creator>
      <dc:date>2022-11-02T19:55:07Z</dc:date>
    </item>
    <item>
      <title>Re: Complex dynamic computation of value based on selection</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-use-Complex-dynamic-computation-of-value-based-on/m-p/1881081#M72601</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;this is what I already tried, but this automatically filter the rows, leaving only the rows corresponding to the max date. See following image.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Schermata 2022-01-14 alle 10.57.59.png" style="width: 449px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/70234i394621BF75B2587C/image-dimensions/449x156?v=v2" width="449" height="156" role="button" title="Schermata 2022-01-14 alle 10.57.59.png" alt="Schermata 2022-01-14 alle 10.57.59.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I want to keep also the others rows and in every row there should be the most recent costs (that are the ones selected in the set analysis above, but also the other rows must continue to appear). Like this:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Schermata 2022-01-14 alle 11.04.22.png" style="width: 452px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/70236iE482E7F12E2BC7C0/image-dimensions/452x200?v=v2" width="452" height="200" role="button" title="Schermata 2022-01-14 alle 11.04.22.png" alt="Schermata 2022-01-14 alle 11.04.22.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jan 2022 10:06:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-use-Complex-dynamic-computation-of-value-based-on/m-p/1881081#M72601</guid>
      <dc:creator>danette</dc:creator>
      <dc:date>2022-01-14T10:06:55Z</dc:date>
    </item>
    <item>
      <title>Re: Complex dynamic computation of value based on selection</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-use-Complex-dynamic-computation-of-value-based-on/m-p/1881098#M72602</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;What is the formula used&amp;nbsp; in Cost ?&lt;/P&gt;
&lt;P&gt;Can you please use sum(Cost) and check.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jan 2022 10:44:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-use-Complex-dynamic-computation-of-value-based-on/m-p/1881098#M72602</guid>
      <dc:creator>Scotlyvictor</dc:creator>
      <dc:date>2022-01-14T10:44:24Z</dc:date>
    </item>
    <item>
      <title>Re: Complex dynamic computation of value based on selection</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-use-Complex-dynamic-computation-of-value-based-on/m-p/1881166#M72607</link>
      <description>&lt;P&gt;This way it works! Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jan 2022 14:14:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-use-Complex-dynamic-computation-of-value-based-on/m-p/1881166#M72607</guid>
      <dc:creator>danette</dc:creator>
      <dc:date>2022-01-14T14:14:53Z</dc:date>
    </item>
    <item>
      <title>Re: Complex dynamic computation of value based on selection</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-use-Complex-dynamic-computation-of-value-based-on/m-p/1881200#M72609</link>
      <description>&lt;P&gt;It works if all products have the same last date, but not if they don't, e.g. if product A has a last date of 01-02-2021, but B and C have a last date of 01-03-2021, you don't get a latest value for B:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="rbartley_0-1642175055054.png" style="width: 963px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/70261iECF02F110BAC1091/image-dimensions/963x297?v=v2" width="963" height="297" role="button" title="rbartley_0-1642175055054.png" alt="rbartley_0-1642175055054.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jan 2022 15:45:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-use-Complex-dynamic-computation-of-value-based-on/m-p/1881200#M72609</guid>
      <dc:creator>rbartley</dc:creator>
      <dc:date>2022-01-14T15:45:05Z</dc:date>
    </item>
    <item>
      <title>Re: Complex dynamic computation of value based on selection</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-use-Complex-dynamic-computation-of-value-based-on/m-p/1881208#M72610</link>
      <description>&lt;P&gt;Yes, I believe this is because in the set analysis the max date is 'general', I mean that the last date that is selected is the absolute max date, not by product.&lt;/P&gt;
&lt;P&gt;To get the last date grouping by product I believe we should use AGGR.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you have any suggestions, that would be greatly appreciated.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jan 2022 16:03:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-use-Complex-dynamic-computation-of-value-based-on/m-p/1881208#M72610</guid>
      <dc:creator>danette</dc:creator>
      <dc:date>2022-01-14T16:03:32Z</dc:date>
    </item>
  </channel>
</rss>

