<?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: Est-ce possible in Francophones</title>
    <link>https://community.qlik.com/t5/Francophones/Est-ce-possible/m-p/514368#M4047</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Je ne traiterais pas le problème de cette façon. J'ajouterais un axe ANALYSE TEMPORELLE qui permet d'avoir ce cumul glissant sur 6 mois, sur 12 mois, de le comparer à l'anne précédente.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Voir document que j'ai créé (en anglais) sur cette question :&lt;/P&gt;&lt;P&gt; &lt;A _jive_internal="true" href="https://community.qlik.com/docs/DOC-4821"&gt;http://community.qlik.com/docs/DOC-4821&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Bonne lecture&lt;/P&gt;&lt;P&gt;Fabrice&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 18 Sep 2013 12:23:03 GMT</pubDate>
    <dc:creator />
    <dc:date>2013-09-18T12:23:03Z</dc:date>
    <item>
      <title>Est-ce possible</title>
      <link>https://community.qlik.com/t5/Francophones/Est-ce-possible/m-p/514362#M4041</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Bonjour à tous,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Je suis devant un problème de conception dans mon script.&lt;/P&gt;&lt;P&gt;Je souhaiterai regrouper des données de ventes (Chiffre d'affaires) par périodes avec un cumul sur les 3 et/ou 6 derniers mois de vente (distinguées par la colonne D et E).&lt;/P&gt;&lt;P&gt;Et cela généré à chaque période de vente.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Voici en sur Excel ce que je souhaiterai (valeur souhaitée G).&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Help_script.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/46503_Help_script.png" style="width: 620px; height: 358px;" /&gt;&lt;/P&gt;&lt;P&gt;L'origine des données est une requête SQL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Y a t'il une solution a mon problème ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Christophe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Sep 2013 12:50:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Francophones/Est-ce-possible/m-p/514362#M4041</guid>
      <dc:creator>chris987</dc:creator>
      <dc:date>2013-09-12T12:50:09Z</dc:date>
    </item>
    <item>
      <title>Re: Est-ce possible</title>
      <link>https://community.qlik.com/t5/Francophones/Est-ce-possible/m-p/514363#M4042</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Bonjour Christophe,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Je sens que vous pourriez aisément retrouver les valeurs que vous désirez en les calculant lors du chargement de vos données grâce à la fonction &lt;STRONG style="color: #0000ff;"&gt;Previous&lt;/STRONG&gt;(), voici un extrait de l'aide en ligne:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="syntax"&gt;&lt;A name="kanchor47"&gt;&lt;/A&gt;&lt;A name="previous"&gt;&lt;/A&gt;&lt;SPAN class="Bold"&gt;&lt;STRONG&gt;previous(&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN class="Italic"&gt;&lt;EM&gt;expression&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN class="Bold"&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;Returns the value of &lt;SPAN class="Italic"&gt;expression&lt;/SPAN&gt; using data from the previous input record. In the first record of an internal table the function will return NULL. The &lt;SPAN class="Bold"&gt;previous&lt;/SPAN&gt; function may be nested in order to access records further back. Data are fetched directly from the input source, making it possible to refer also to fields which have not been loaded into QlikView, i.e. even if they have not been stored in its associative database. &lt;/P&gt;&lt;P class="example"&gt;&lt;STRONG&gt;Examples&lt;/STRONG&gt;:&lt;/P&gt;&lt;P class="Code" style="margin-left: 40px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;Load *, Sales / previous(Sales) as Increase from ...;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="Code" style="margin-left: 40px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;Load A, previous(previous( A )) as B from ...;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Sep 2013 12:55:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Francophones/Est-ce-possible/m-p/514363#M4042</guid>
      <dc:creator>pgrenier</dc:creator>
      <dc:date>2013-09-12T12:55:23Z</dc:date>
    </item>
    <item>
      <title>Re: Est-ce possible</title>
      <link>https://community.qlik.com/t5/Francophones/Est-ce-possible/m-p/514364#M4043</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Bonjour Philippe, merci pour votre réponse.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;J'ai donc fait ceci dans mon script avec la fonction peek() plutôt que previous. (en dessous dans l'aide^^)&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;VentesBase:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;select&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; CART, SUBSTRING(CONVERT(varchar, DATE, 120), 1, 7) as [Période de vente], SUM(QTE) as Unit, SUM(Mtht) as CA, SUM(MTHT-(QTE*PUMP)) as marge,&lt;BR /&gt; SUBSTRING(CONVERT(varchar,DATEADD(Month, -5, DATE),120),1,7) as [Borne mini]&lt;BR /&gt; ,SUBSTRING(CONVERT(varchar, DATE, 120), 1, 7) as [Borne maxi]&lt;BR /&gt;from HistLivraisons2&lt;BR /&gt;where DATE &amp;gt;='01/01/2011' and CART ='018114' and AVOIR=0 and MTHT&amp;gt;0&lt;BR /&gt;group by CART, SUBSTRING(CONVERT(varchar, DATE, 120), 1, 7) ,SUBSTRING(CONVERT(varchar, DATE, 120), 1, 7)&lt;BR /&gt; ,SUBSTRING(CONVERT(varchar,DATEADD(Month, -5, DATE),120),1,7)&lt;BR /&gt;order by&amp;nbsp; CART, SUBSTRING(CONVERT(varchar, DATE, 120), 1, 7);&lt;BR /&gt;&lt;BR /&gt;Ventes:&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;Load&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; *, &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;peek&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;('Unit',-2)+&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;peek&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;('Unit',-1)+ &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Unit&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;cumul1&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Resident&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; VentesBase;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;Drop&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Table&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; VentesBase; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Il en découle une nouvelle contrainte chaque mois (de vente) n'apparait pas systématiquement dans la liste.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Par exemple ventes en janvier mais pas en février, lorsque je fais un peek, je reprend les dernières valeurs dans la table, sans tenir compte de la date, y a t'il un moyen de contourner cette contrainte ?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Christophe&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Sep 2013 13:55:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Francophones/Est-ce-possible/m-p/514364#M4043</guid>
      <dc:creator>chris987</dc:creator>
      <dc:date>2013-09-12T13:55:40Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Est-ce possible</title>
      <link>https://community.qlik.com/t5/Francophones/Est-ce-possible/m-p/514365#M4044</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ah oui, effectivement, dans ce cas, vous pourriez construire votre table en y allant par étapes. Voici une approche que vous pourriez suivre, en attachement, un document QlikView avec ce script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DataSet:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;LOAD&lt;/STRONG&gt;&lt;/SPAN&gt; * &lt;SPAN style="color: #0000ff;"&gt;Inline&lt;/SPAN&gt; [&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #993300;"&gt;SalesDate, SalesAmount&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #993300;"&gt;07/09/2012, 832.36&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #993300;"&gt;15/09/2012, 156.65&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #993300;"&gt;10/10/2012, 1215.27&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #993300;"&gt;16/10/2012, 578.43&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #993300;"&gt;04/11/2012, 46.47&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #993300;"&gt;18/11/2012, 345.16&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #993300;"&gt;04/12/2012, 16.23&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #993300;"&gt;12/01/2013, 161.18&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #993300;"&gt;15/01/2013, 116.25&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #993300;"&gt;29/01/2013, 734.56&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #993300;"&gt;14/02/2013, 980.67&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #993300;"&gt;26/02/2013, 87.76&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #993300;"&gt;26/02/2013, 876.15&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #993300;"&gt;03/03/2013, 1068.48&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #993300;"&gt;07/03/2013, 4684.21&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #993300;"&gt;10/03/2013, 187.87&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #993300;"&gt;16/03/2013, 1674.24&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #993300;"&gt;24/03/2013, 894.67&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #993300;"&gt;24/03/2013, 985.13&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #993300;"&gt;30/03/2013, 1249.87&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #993300;"&gt;15/05/2013, 328.75&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #993300;"&gt;21/05/2013, 2385.76&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #993300;"&gt;22/05/2013, 87.54&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #993300;"&gt;08/06/2013, 637.99&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #993300;"&gt;15/06/2013, 1068.49&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #993300;"&gt;16/06/2013, 618.54&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #993300;"&gt;17/07/2013, 319.16&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #993300;"&gt;18/07/2013, 987.24&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #993300;"&gt;15/08/2013, 30.89&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #993300;"&gt;22/08/2013, 423.65&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #993300;"&gt;08/09/2013, 785.24&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;map_Sales:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;Mapping Load Num&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff;"&gt;MonthStart&lt;/SPAN&gt;(&lt;SPAN style="color: #993300;"&gt;SalesDate&lt;/SPAN&gt;)) as SalesMonth, &lt;SPAN style="color: #0000ff;"&gt;Sum&lt;/SPAN&gt;(&lt;SPAN style="color: #993300;"&gt;SalesAmount&lt;/SPAN&gt;) as MonthlySales&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;Resident&lt;/SPAN&gt; DataSet&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;Group By MonthStart&lt;/SPAN&gt;(&lt;SPAN style="color: #993300;"&gt;SalesDate&lt;/SPAN&gt;);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tmp_MinDate:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;LOAD&lt;/STRONG&gt; Num(Min(MonthStart&lt;/SPAN&gt;(&lt;SPAN style="color: #993300;"&gt;SalesDate&lt;/SPAN&gt;))) as &lt;SPAN style="color: #993300;"&gt;MinDate&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;Resident&lt;/SPAN&gt; DataSet;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;LET&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;EM style=": ; color: #999999;"&gt;&lt;STRONG&gt;v_MinDate&lt;/STRONG&gt;&lt;/EM&gt; = &lt;SPAN style="color: #0000ff;"&gt;Peek&lt;/SPAN&gt;('MinDate', 0, 'tmp_MinDate');&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;DROP&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN style="color: #0000ff;"&gt;Tables&lt;/SPAN&gt; tmp_MinDate, DataSet;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MonthlySales:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;LOAD&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN style="color: #0000ff;"&gt;AddMonths&lt;/SPAN&gt;(&lt;EM style="color: #999999;"&gt;&lt;STRONG&gt;$(v_MinDate)&lt;/STRONG&gt;&lt;/EM&gt;, &lt;SPAN style="color: #0000ff;"&gt;RowNo&lt;/SPAN&gt;()-1) as &lt;SPAN style="color: #993300;"&gt;SalesMonth&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; , &lt;SPAN style="color: #0000ff;"&gt;ApplyMap&lt;/SPAN&gt;('map_Sales', &lt;SPAN style="color: #0000ff;"&gt;Num&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff;"&gt;AddMonths&lt;/SPAN&gt;(&lt;EM style="color: #999999;"&gt;&lt;STRONG&gt;$(v_MinDate)&lt;/STRONG&gt;&lt;/EM&gt;, &lt;SPAN style="color: #0000ff;"&gt;RowNo&lt;/SPAN&gt;()-1)), 0) as &lt;SPAN style="color: #993300;"&gt;MonthlySales&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; , &lt;SPAN style="color: #0000ff;"&gt;ApplyMap&lt;/SPAN&gt;('map_Sales', &lt;SPAN style="color: #0000ff;"&gt;Num&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff;"&gt;AddMonths&lt;/SPAN&gt;(&lt;EM style="color: #999999;"&gt;&lt;STRONG&gt;$(v_MinDate)&lt;/STRONG&gt;&lt;/EM&gt;, &lt;SPAN style="color: #0000ff;"&gt;RowNo&lt;/SPAN&gt;()-1)), 0)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; + &lt;SPAN style="color: #0000ff;"&gt;ApplyMap&lt;/SPAN&gt;('map_Sales', &lt;SPAN style="color: #0000ff;"&gt;Num&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff;"&gt;AddMonths&lt;/SPAN&gt;(&lt;EM style="color: #999999;"&gt;&lt;STRONG&gt;$(v_MinDate)&lt;/STRONG&gt;&lt;/EM&gt;, &lt;SPAN style="color: #0000ff;"&gt;RowNo&lt;/SPAN&gt;()-2)), 0)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; + &lt;SPAN style="color: #0000ff;"&gt;ApplyMap&lt;/SPAN&gt;('map_Sales', &lt;SPAN style="color: #0000ff;"&gt;Num&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff;"&gt;AddMonths&lt;/SPAN&gt;(&lt;STRONG style="color: #999999;"&gt;&lt;EM&gt;$(v_MinDate)&lt;/EM&gt;&lt;/STRONG&gt;, &lt;SPAN style="color: #0000ff;"&gt;RowNo&lt;/SPAN&gt;()-3)), 0) as &lt;SPAN style="color: #993300;"&gt;ThreeMonthCumulativeSales&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;AutoGenerate&lt;/SPAN&gt;((&lt;SPAN style="color: #0000ff;"&gt;Year&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff;"&gt;Today&lt;/SPAN&gt;())-&lt;SPAN style="color: #0000ff;"&gt;Year&lt;/SPAN&gt;(&lt;EM style="color: #999999;"&gt;&lt;STRONG&gt;$(v_MinDate)&lt;/STRONG&gt;&lt;/EM&gt;))*12 + &lt;SPAN style="color: #0000ff;"&gt;Month&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff;"&gt;Today&lt;/SPAN&gt;())-&lt;SPAN style="color: #0000ff;"&gt;Month&lt;/SPAN&gt;(&lt;EM style="color: #999999;"&gt;&lt;STRONG&gt;$(v_MinDate)&lt;/STRONG&gt;&lt;/EM&gt;) +1);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Bonne journée!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/* Petite coquille de code corrigée &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt; */&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Sep 2013 12:33:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Francophones/Est-ce-possible/m-p/514365#M4044</guid>
      <dc:creator>pgrenier</dc:creator>
      <dc:date>2013-09-13T12:33:59Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Re: Est-ce possible</title>
      <link>https://community.qlik.com/t5/Francophones/Est-ce-possible/m-p/514366#M4045</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Bonjour Philippe,&lt;/P&gt;&lt;P&gt;Merci pour votre réponse et votre script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;En fait, j'ai une nouvelle problématique, Mapping load ne gère que 2 champs, ici Date et Montant, ce qui correspondait à ma demande initiale, j'ai oublié de dire qu'il fallait tenir compte du code articles (j'ai 12000 articles en base).&lt;/P&gt;&lt;P&gt;Dans mon cas j'ai une notion de code article, montant et date. Comment faire pour que tout soit pris en compte ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Article / Période / Montant.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;P&gt;Ps: 2 petites erreurs se son glissées dans le script que vous m'avez gentiment fourni, je le précise pour ceux qui en aurait besoin.&lt;/P&gt;&lt;P&gt;MonthlySales:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;LOAD&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN style="color: #0000ff;"&gt;AddMonths&lt;/SPAN&gt;(&lt;EM&gt;&lt;STRONG style="color: #999999;"&gt;$(v_MinDate)&lt;/STRONG&gt;&lt;/EM&gt;, &lt;SPAN style="color: #0000ff;"&gt;RowNo&lt;/SPAN&gt;()&lt;STRONG style="text-decoration: underline;"&gt;&lt;SPAN style="color: #575757; text-decoration: underline;"&gt;&lt;SPAN style="color: #339966; text-decoration: underline;"&gt;-1&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;) as &lt;SPAN style="color: #993300;"&gt;SalesMonth &lt;SPAN style="color: #339966;"&gt;// -1 pour prendre en compte le premier mois&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; , &lt;SPAN style="color: #0000ff;"&gt;ApplyMap&lt;/SPAN&gt;('map_Sales', &lt;SPAN style="color: #0000ff;"&gt;Num&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff;"&gt;AddMonths&lt;/SPAN&gt;(&lt;EM&gt;&lt;STRONG style="color: #999999;"&gt;$(v_MinDate)&lt;/STRONG&gt;&lt;/EM&gt;, &lt;SPAN style="color: #0000ff;"&gt;RowNo&lt;/SPAN&gt;()-1)), 0) as &lt;SPAN style="color: #993300;"&gt;MonthlySales&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; , &lt;SPAN style="color: #0000ff;"&gt;ApplyMap&lt;/SPAN&gt;('map_Sales', &lt;SPAN style="color: #0000ff;"&gt;Num&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff;"&gt;AddMonths&lt;/SPAN&gt;(&lt;EM&gt;&lt;STRONG style="color: #999999;"&gt;$(v_MinDate)&lt;/STRONG&gt;&lt;/EM&gt;, &lt;SPAN style="color: #0000ff;"&gt;RowNo&lt;/SPAN&gt;()-1)), 0)&lt;/P&gt;&lt;P&gt;&amp;nbsp; + &lt;SPAN style="color: #0000ff;"&gt;ApplyMap&lt;/SPAN&gt;('map_Sales', &lt;SPAN style="color: #0000ff;"&gt;Num&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff;"&gt;AddMonths&lt;/SPAN&gt;(&lt;EM&gt;&lt;STRONG style="color: #999999;"&gt;$(v_MinDate)&lt;/STRONG&gt;&lt;/EM&gt;, &lt;SPAN style="color: #0000ff;"&gt;RowNo&lt;/SPAN&gt;()-2)), 0)&lt;/P&gt;&lt;P&gt;&amp;nbsp; + &lt;SPAN style="color: #0000ff;"&gt;ApplyMap&lt;/SPAN&gt;('map_Sales', &lt;SPAN style="color: #0000ff;"&gt;Num&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff;"&gt;AddMonths&lt;/SPAN&gt;(&lt;STRONG&gt;&lt;EM style="color: #999999;"&gt;$(v_MinDate)&lt;/EM&gt;&lt;/STRONG&gt;, &lt;SPAN style="color: #0000ff;"&gt;RowNo&lt;/SPAN&gt;()-3)), 0) as &lt;SPAN style="color: #993300;"&gt;ThreeMonthCumulativeSales&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;AutoGenerate&lt;/SPAN&gt;((&lt;SPAN style="color: #0000ff;"&gt;Year&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff;"&gt;Today&lt;/SPAN&gt;())-&lt;SPAN style="color: #0000ff;"&gt;Year&lt;/SPAN&gt;(&lt;EM&gt;&lt;STRONG style="color: #999999;"&gt;$(v_MinDate)&lt;/STRONG&gt;&lt;/EM&gt;))*1&lt;SPAN style="color: #339966; text-decoration: underline;"&gt;&lt;STRONG&gt;3&lt;/STRONG&gt;&lt;/SPAN&gt; + &lt;SPAN style="color: #0000ff;"&gt;Month&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff;"&gt;Today&lt;/SPAN&gt;())-&lt;SPAN style="color: #0000ff;"&gt;Month&lt;/SPAN&gt;(&lt;EM&gt;&lt;STRONG style="color: #999999;"&gt;$(v_MinDate)&lt;/STRONG&gt;&lt;/EM&gt;)); &lt;SPAN style="color: #339966;"&gt;// * 13 pour aller jusqu'au dernier mois à cause du décalage en première ligne&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Cordialement&lt;/P&gt;&lt;P&gt;Christophe&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Sep 2013 13:28:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Francophones/Est-ce-possible/m-p/514366#M4045</guid>
      <dc:creator>chris987</dc:creator>
      <dc:date>2013-09-16T13:28:38Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Re: Re: Est-ce possible</title>
      <link>https://community.qlik.com/t5/Francophones/Est-ce-possible/m-p/514367#M4046</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Bonjour Christophe,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Bien vu pour les coquilles de code, on est jamais à l'abri d'erreurs lorsqu'on se dépêche à fournir une réponse! &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt; Bien que je doute que le *13 soit exact, et qu'il serait peut-être plus judicieux d'ajouter un +1 à la fin du schmilblick pour compenser le décalage. J'ai corrigé mon post original à cet effet.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pour en revenir à votre cas d'affaires, je vous ai fourni un nouveau fichier exemple en attachement qui vous donnera un bon exemple pour gérer de façon similaire la situation en cours. Pour ce faire, j'ai réparti sous 4 codes de produits différents les données de l'exemple précédent, et ai changé le script quelque peu afin de représenter une solution possible à votre requête:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt;DataSet:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;LOAD&lt;/STRONG&gt;&lt;/SPAN&gt; * &lt;SPAN style="color: #0000ff;"&gt;Inline&lt;/SPAN&gt; &lt;SPAN style="color: #8b0000;"&gt;[&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #8b0000; font-family: 'courier new', courier; font-size: 8pt;"&gt;ProductCode, SalesDate, SalesAmount&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #8b0000; font-family: 'courier new', courier; font-size: 8pt;"&gt;1, 07/09/2012, 832.36&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #8b0000; font-family: 'courier new', courier; font-size: 8pt;"&gt;2, 15/09/2012, 156.65&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #8b0000; font-family: 'courier new', courier; font-size: 8pt;"&gt;3, 10/10/2012, 1215.27&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #8b0000; font-family: 'courier new', courier; font-size: 8pt;"&gt;4, 16/10/2012, 578.43&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #8b0000; font-family: 'courier new', courier; font-size: 8pt;"&gt;1, 04/11/2012, 46.47&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #8b0000; font-family: 'courier new', courier; font-size: 8pt;"&gt;4, 18/11/2012, 345.16&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #8b0000; font-family: 'courier new', courier; font-size: 8pt;"&gt;1, 04/12/2012, 16.23&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #8b0000; font-family: 'courier new', courier; font-size: 8pt;"&gt;4, 12/01/2013, 161.18&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #8b0000; font-family: 'courier new', courier; font-size: 8pt;"&gt;1, 15/01/2013, 116.25&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #8b0000; font-family: 'courier new', courier; font-size: 8pt;"&gt;2, 29/01/2013, 734.56&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #8b0000; font-family: 'courier new', courier; font-size: 8pt;"&gt;1, 14/02/2013, 980.67&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #8b0000; font-family: 'courier new', courier; font-size: 8pt;"&gt;3, 26/02/2013, 87.76&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #8b0000; font-family: 'courier new', courier; font-size: 8pt;"&gt;1, 26/02/2013, 876.15&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #8b0000; font-family: 'courier new', courier; font-size: 8pt;"&gt;2, 03/03/2013, 1068.48&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #8b0000; font-family: 'courier new', courier; font-size: 8pt;"&gt;1, 07/03/2013, 4684.21&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #8b0000; font-family: 'courier new', courier; font-size: 8pt;"&gt;4, 10/03/2013, 187.87&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #8b0000; font-family: 'courier new', courier; font-size: 8pt;"&gt;1, 16/03/2013, 1674.24&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #8b0000; font-family: 'courier new', courier; font-size: 8pt;"&gt;3, 24/03/2013, 894.67&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #8b0000; font-family: 'courier new', courier; font-size: 8pt;"&gt;2, 24/03/2013, 985.13&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #8b0000; font-family: 'courier new', courier; font-size: 8pt;"&gt;4, 30/03/2013, 1249.87&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #8b0000; font-family: 'courier new', courier; font-size: 8pt;"&gt;1, 15/05/2013, 328.75&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #8b0000; font-family: 'courier new', courier; font-size: 8pt;"&gt;4, 21/05/2013, 2385.76&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #8b0000; font-family: 'courier new', courier; font-size: 8pt;"&gt;1, 22/05/2013, 87.54&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #8b0000; font-family: 'courier new', courier; font-size: 8pt;"&gt;3, 08/06/2013, 637.99&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #8b0000; font-family: 'courier new', courier; font-size: 8pt;"&gt;3, 15/06/2013, 1068.49&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #8b0000; font-family: 'courier new', courier; font-size: 8pt;"&gt;1, 16/06/2013, 618.54&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #8b0000; font-family: 'courier new', courier; font-size: 8pt;"&gt;4, 17/07/2013, 319.16&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #8b0000; font-family: 'courier new', courier; font-size: 8pt;"&gt;1, 18/07/2013, 987.24&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #8b0000; font-family: 'courier new', courier; font-size: 8pt;"&gt;2, 15/08/2013, 30.89&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #8b0000; font-family: 'courier new', courier; font-size: 8pt;"&gt;1, 22/08/2013, 423.65&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #8b0000; font-family: 'courier new', courier; font-size: 8pt;"&gt;3, 08/09/2013, 785.24&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&lt;SPAN style="color: #8b0000;"&gt;]&lt;/SPAN&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;map_Sales:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&lt;SPAN style="color: #0000ff;"&gt;Mapping&lt;/SPAN&gt; &lt;STRONG style="color: #0000ff;"&gt;LOAD&lt;/STRONG&gt; &lt;SPAN style="color: #8b0000;"&gt;ProductCode&lt;/SPAN&gt;&amp;amp;'~'&amp;amp;&lt;SPAN style="color: #0000ff;"&gt;Num&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff;"&gt;MonthStart&lt;/SPAN&gt;(&lt;SPAN style="color: #8b0000;"&gt;SalesDate&lt;/SPAN&gt;)) &lt;SPAN style="color: #0000ff;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="color: #8b0000;"&gt;ProductSalesMonth&lt;/SPAN&gt;, &lt;SPAN style="color: #0000ff;"&gt;Sum&lt;/SPAN&gt;(&lt;SPAN style="color: #8b0000;"&gt;SalesAmount&lt;/SPAN&gt;) &lt;SPAN style="color: #0000ff;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="color: #8b0000;"&gt;MonthlySales&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&lt;SPAN style="color: #0000ff;"&gt;Resident&lt;/SPAN&gt; DataSet&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&lt;SPAN style="color: #0000ff;"&gt;Group By&lt;/SPAN&gt; &lt;SPAN style="color: #8b0000;"&gt;ProductCode&lt;/SPAN&gt;, &lt;SPAN style="color: #0000ff;"&gt;MonthStart&lt;/SPAN&gt;(&lt;SPAN style="color: #8b0000;"&gt;SalesDate&lt;/SPAN&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;tmp_MonthlySales:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&lt;STRONG style="color: #0000ff;"&gt;LOAD&lt;/STRONG&gt; &lt;SPAN style="color: #0000ff;"&gt;DISTINCT&lt;/SPAN&gt; &lt;SPAN style="color: #8b0000;"&gt;ProductCode&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&lt;SPAN style="color: #0000ff;"&gt;Resident&lt;/SPAN&gt; DataSet;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;tmp_MinDate:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&lt;STRONG style="color: #0000ff;"&gt;LOAD&lt;/STRONG&gt; &lt;SPAN style="color: #0000ff;"&gt;Num&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff;"&gt;Min&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff;"&gt;MonthStart&lt;/SPAN&gt;(&lt;SPAN style="color: #8b0000;"&gt;SalesDate&lt;/SPAN&gt;))) &lt;SPAN style="color: #0000ff;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="color: #8b0000;"&gt;MinDate&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&lt;SPAN style="color: #0000ff;"&gt;Resident&lt;/SPAN&gt; DataSet;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&lt;STRONG style="color: #0000ff;"&gt;LET&lt;/STRONG&gt; &lt;SPAN style="color: #808080;"&gt;&lt;STRONG&gt;&lt;EM style="color: #999999;"&gt;v_MinDate&lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt; = &lt;SPAN style="color: #0000ff;"&gt;Peek&lt;/SPAN&gt;('MinDate', 0, 'tmp_MinDate');&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&lt;STRONG style="color: #0000ff;"&gt;DROP&lt;/STRONG&gt; &lt;SPAN style="color: #0000ff;"&gt;Tables&lt;/SPAN&gt; tmp_MinDate, DataSet;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&lt;SPAN style="color: #0000ff;"&gt;Left Join&lt;/SPAN&gt;(tmp_MonthlySales)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&lt;STRONG style="color: #0000ff;"&gt;LOAD&lt;/STRONG&gt; &lt;SPAN style="color: #0000ff;"&gt;AddMonths&lt;/SPAN&gt;(&lt;EM&gt;&lt;STRONG style="color: #999999;"&gt;$(v_MinDate)&lt;/STRONG&gt;&lt;/EM&gt;, &lt;SPAN style="color: #0000ff;"&gt;RowNo&lt;/SPAN&gt;()-1) &lt;SPAN style="color: #0000ff;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="color: #8b0000;"&gt;SalesMonth&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&lt;SPAN style="color: #0000ff;"&gt;AutoGenerate&lt;/SPAN&gt;((&lt;SPAN style="color: #0000ff;"&gt;Year&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff;"&gt;Today&lt;/SPAN&gt;())-&lt;SPAN style="color: #0000ff;"&gt;Year&lt;/SPAN&gt;(&lt;SPAN style="color: #999999;"&gt;&lt;EM&gt;&lt;STRONG&gt;$(v_MinDate)&lt;/STRONG&gt;&lt;/EM&gt;&lt;/SPAN&gt;))*12 + &lt;SPAN style="color: #0000ff;"&gt;Month&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff;"&gt;Today&lt;/SPAN&gt;())-&lt;SPAN style="color: #0000ff;"&gt;Month&lt;/SPAN&gt;(&lt;SPAN style="color: #999999;"&gt;&lt;EM&gt;&lt;STRONG&gt;$(v_MinDate)&lt;/STRONG&gt;&lt;/EM&gt;&lt;/SPAN&gt;)+1);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;MonthlySales:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&lt;STRONG style="color: #0000ff;"&gt;LOAD&lt;/STRONG&gt; &lt;SPAN style="color: #8b0000;"&gt;ProductCode&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp; , &lt;SPAN style="color: #8b0000;"&gt;SalesMonth&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp; , &lt;SPAN style="color: #0000ff;"&gt;ApplyMap&lt;/SPAN&gt;('map_Sales', &lt;SPAN style="color: #8b0000;"&gt;ProductCode&lt;/SPAN&gt;&amp;amp;'~'&amp;amp;&lt;SPAN style="color: #0000ff;"&gt;Num&lt;/SPAN&gt;(&lt;SPAN style="color: #8b0000;"&gt;SalesMonth&lt;/SPAN&gt;), 0) &lt;SPAN style="color: #0000ff;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="color: #8b0000;"&gt;MonthlySales&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp; , &lt;SPAN style="color: #0000ff;"&gt;ApplyMap&lt;/SPAN&gt;('map_Sales', &lt;SPAN style="color: #8b0000;"&gt;ProductCode&lt;/SPAN&gt;&amp;amp;'~'&amp;amp;&lt;SPAN style="color: #0000ff;"&gt;Num&lt;/SPAN&gt;(&lt;SPAN style="color: #8b0000;"&gt;SalesMonth&lt;/SPAN&gt;), 0)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp; + &lt;SPAN style="color: #0000ff;"&gt;ApplyMap&lt;/SPAN&gt;('map_Sales', &lt;SPAN style="color: #8b0000;"&gt;ProductCode&lt;/SPAN&gt;&amp;amp;'~'&amp;amp;&lt;SPAN style="color: #0000ff;"&gt;Num&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff;"&gt;AddMonths&lt;/SPAN&gt;(&lt;SPAN style="color: #8b0000;"&gt;SalesMonth&lt;/SPAN&gt;, -1)), 0)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp; + &lt;SPAN style="color: #0000ff;"&gt;ApplyMap&lt;/SPAN&gt;('map_Sales', &lt;SPAN style="color: #8b0000;"&gt;ProductCode&lt;/SPAN&gt;&amp;amp;'~'&amp;amp;&lt;SPAN style="color: #0000ff;"&gt;Num&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff;"&gt;AddMonths&lt;/SPAN&gt;(&lt;SPAN style="color: #8b0000;"&gt;SalesMonth&lt;/SPAN&gt;, -2)), 0) &lt;SPAN style="color: #0000ff;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="color: #8b0000;"&gt;ThreeMonthCumulativeSales&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&lt;SPAN style="color: #0000ff;"&gt;Resident&lt;/SPAN&gt; tmp_MonthlySales;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt;&lt;STRONG style="color: #0000ff;"&gt;DROP&lt;/STRONG&gt; &lt;SPAN style="color: #0000ff;"&gt;Table&lt;/SPAN&gt; tmp_MonthlySales;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cordialement,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Philippe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Sep 2013 23:02:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Francophones/Est-ce-possible/m-p/514367#M4046</guid>
      <dc:creator>pgrenier</dc:creator>
      <dc:date>2013-09-16T23:02:23Z</dc:date>
    </item>
    <item>
      <title>Re: Est-ce possible</title>
      <link>https://community.qlik.com/t5/Francophones/Est-ce-possible/m-p/514368#M4047</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Je ne traiterais pas le problème de cette façon. J'ajouterais un axe ANALYSE TEMPORELLE qui permet d'avoir ce cumul glissant sur 6 mois, sur 12 mois, de le comparer à l'anne précédente.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Voir document que j'ai créé (en anglais) sur cette question :&lt;/P&gt;&lt;P&gt; &lt;A _jive_internal="true" href="https://community.qlik.com/docs/DOC-4821"&gt;http://community.qlik.com/docs/DOC-4821&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Bonne lecture&lt;/P&gt;&lt;P&gt;Fabrice&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Sep 2013 12:23:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Francophones/Est-ce-possible/m-p/514368#M4047</guid>
      <dc:creator />
      <dc:date>2013-09-18T12:23:03Z</dc:date>
    </item>
    <item>
      <title>Re: Est-ce possible</title>
      <link>https://community.qlik.com/t5/Francophones/Est-ce-possible/m-p/514369#M4048</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Bonjour Fabrice,&lt;/P&gt;&lt;P&gt;Merci pour votre réponse, j'ai mis un peu de temps à maitriser la technique, mais je crois que j'y suis arrivé.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;J'ai une autre question, à partir du script ci-dessous, je désirerai pouvoir définir un critère basé sur le ROLL6 (qui me servira de dimension) et l'intégrer dans cette même table plutôt que de le calculer dans le graphique.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Est ce réalisable ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tmp_Achats:&lt;BR /&gt;select &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CART as [Code article]&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,SUBSTRING(CONVERT(varchar, DATE, 120), 1, 7) as [Periode_Achat]&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,sum(-QTE) as [Quantité achat]&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,sum(MTHT) as [Montant ligne achat]&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,Count(distinct CPIECE) as [Nombre de commande]&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;from HistAchats2&lt;BR /&gt;where date &amp;gt;= $(vDateMin) and TYPE = 2&lt;BR /&gt;group by CART, SUBSTRING(CONVERT(varchar, DATE, 120), 1, 7);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Achats:&lt;BR /&gt;LOAD &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Achats' as [Type mouvement],&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Code article],&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ApplyMap('MapPeriode', Text([Periode_Achat])) as TIME_KEY,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Quantité achat] as Quantité,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Montant ligne achat],&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Nombre de commande]&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;resident Tmp_Achats;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DROP Table Tmp_Achats;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Merci pour votre aide&lt;/P&gt;&lt;P&gt;Christophe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Sep 2013 14:44:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Francophones/Est-ce-possible/m-p/514369#M4048</guid>
      <dc:creator>chris987</dc:creator>
      <dc:date>2013-09-24T14:44:16Z</dc:date>
    </item>
  </channel>
</rss>

