<?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: Find the last week &amp; year in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Find-the-last-week-year/m-p/1285441#M849551</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Recreate a the field with a dual value like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;Dual&lt;/STRONG&gt;(SEMAINE_ANNEE,SubField(SEMAINE_ANNEE,'|',1)*100+SubField(SEMAINE_ANNEE,'|',2)) &lt;STRONG&gt;as SEMAINE_ANNEE&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And then front end expression like:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;=Sum({&amp;lt;SEMAINE_ANNEE={"=Rank(SEMAINE_ANNEE)&amp;lt;4"}&amp;gt;}STOCK)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Once your field is created with dual value, you can directly use any numerical function like max(), min()...&lt;/P&gt;&lt;P&gt;&lt;EM&gt;=Max(SEMAINE_ANNEE)&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 14 Mar 2017 13:17:05 GMT</pubDate>
    <dc:creator>tresB</dc:creator>
    <dc:date>2017-03-14T13:17:05Z</dc:date>
    <item>
      <title>Find the last week &amp; year</title>
      <link>https://community.qlik.com/t5/QlikView/Find-the-last-week-year/m-p/1285440#M849550</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="margin-bottom: .0001pt;"&gt;Hi all, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;I have concatenated year and week as mentioned in the below &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;SEMAINE_ANNEE&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;2016|1&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;2016|2&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;2016|3&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;2016|51&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;2016|52&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;2017|1&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;2017|2&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;2017|3&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;Now i want to calculate the stock movement by adding the turnover based on the last three weeks in the selected list and divide the stock quantity of the last week in my selection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;Example: Sum (CA) 2017|1, 2017|2, 2017|3 / (divided) by Sum (STOCK) of 2017|3&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;Can anyone hint me, how to find the last (MAX) three weeks from the SEMAINE_ANNE selection. and also the last week (MAX) &lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;They are in string format.&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;Regards&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;Djega&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Find-the-last-week-year/m-p/1285440#M849550</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Find the last week &amp; year</title>
      <link>https://community.qlik.com/t5/QlikView/Find-the-last-week-year/m-p/1285441#M849551</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Recreate a the field with a dual value like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;Dual&lt;/STRONG&gt;(SEMAINE_ANNEE,SubField(SEMAINE_ANNEE,'|',1)*100+SubField(SEMAINE_ANNEE,'|',2)) &lt;STRONG&gt;as SEMAINE_ANNEE&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And then front end expression like:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;=Sum({&amp;lt;SEMAINE_ANNEE={"=Rank(SEMAINE_ANNEE)&amp;lt;4"}&amp;gt;}STOCK)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Once your field is created with dual value, you can directly use any numerical function like max(), min()...&lt;/P&gt;&lt;P&gt;&lt;EM&gt;=Max(SEMAINE_ANNEE)&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Mar 2017 13:17:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Find-the-last-week-year/m-p/1285441#M849551</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2017-03-14T13:17:05Z</dc:date>
    </item>
    <item>
      <title>Re: Find the last week &amp; year</title>
      <link>https://community.qlik.com/t5/QlikView/Find-the-last-week-year/m-p/1285442#M849552</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;Create Autonumber of &lt;SPAN style="color: #000000; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;SEMAINE_ANNEE&lt;/SPAN&gt; order by Year and Week.&lt;/P&gt;&lt;P&gt;It will be like this,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #000000;"&gt;SEMAINE_ANNEE Autonum&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #000000;"&gt;2016|1&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #000000;"&gt;2016|2&amp;nbsp;&amp;nbsp;&amp;nbsp; 2&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #000000;"&gt;2016|3&amp;nbsp;&amp;nbsp;&amp;nbsp; 3&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #000000;"&gt;2016|51&amp;nbsp; 4&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #000000;"&gt;2016|52&amp;nbsp; 5&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #000000;"&gt;2017|1&amp;nbsp;&amp;nbsp; 6&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #000000;"&gt;2017|2&amp;nbsp;&amp;nbsp; 7&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #000000;"&gt;2017|3&amp;nbsp;&amp;nbsp; 8&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #000000;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #000000;"&gt;&lt;SPAN style="color: #000000; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Sum({$&amp;lt;AutoNum={"&amp;gt;=$(=Max(AutoNum)-2)&amp;lt;=$(=Max(AutoNum))"}&amp;gt;}CA) / Sum({$&amp;lt;AutoNum={$(=Max(AutoNum))}&amp;gt;}STOCK)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Mar 2017 13:17:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Find-the-last-week-year/m-p/1285442#M849552</guid>
      <dc:creator>muthukumar77</dc:creator>
      <dc:date>2017-03-14T13:17:38Z</dc:date>
    </item>
  </channel>
</rss>

