<?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: Calculating M-1 and 12 rolling months in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Calculating-M-1-and-12-rolling-months/m-p/1726461#M55375</link>
    <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/41208"&gt;@arulsettu&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried using add months&lt;/P&gt;&lt;P&gt;Addmonths(max(Date),-1)&amp;nbsp; and it gives output 01/05/2020- which is correct as my max month is june.&lt;/P&gt;&lt;P&gt;But when i am passing the same in the expression and select any month from the filter, it is returning me the current month value instead of previous month.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please see the expression:-&lt;/P&gt;&lt;P&gt;=sum({&amp;lt;Indicateur.Code = {'PO.1.701'},Date.Year=,[Date.MonthEnd]=, NewTestvb1,[Date.MonthName]=, Date={'=$(=(addmonths(max(Date),-1)))'}&amp;gt;} Indicateur.Value)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It is giving me the output but when i select june2020, it should give me the value of May2020 but it is giving&amp;nbsp; me the value of June only.&lt;/P&gt;&lt;P&gt;Please suggest.&lt;/P&gt;</description>
    <pubDate>Thu, 09 Jul 2020 11:53:31 GMT</pubDate>
    <dc:creator>Aspiring_Developer</dc:creator>
    <dc:date>2020-07-09T11:53:31Z</dc:date>
    <item>
      <title>Calculating M-1 and 12 rolling months</title>
      <link>https://community.qlik.com/t5/App-Development/Calculating-M-1-and-12-rolling-months/m-p/1726421#M55370</link>
      <description>&lt;P&gt;hello All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to calculate M-1 and rolling 12 months .&lt;/P&gt;&lt;P&gt;when user select Jun-20 from filter, M-1 should display the sum of previous months and 12RM should display the sum of all the months of previous year.&lt;/P&gt;&lt;P&gt;Here the filter used is NewTestVb1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have below dates&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Aspiring_Developer_0-1594290644715.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/37202iF64E7890702023F7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Aspiring_Developer_0-1594290644715.png" alt="Aspiring_Developer_0-1594290644715.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I am using below expression :-&lt;/P&gt;&lt;P&gt;=sum({&amp;lt;Indicateur.Code = {'PO.1.701'}, NewTestvb1= {'=$(=((max(NewTestvb1)-1)))'}&amp;gt;} Indicateur.Value)&lt;/P&gt;&lt;P&gt;I think i should use Date.Num Month , i tried to get the max(date.NumMonth)-1 but it is not giving me the proper date.&lt;/P&gt;&lt;P&gt;I tried this&amp;nbsp;=addmonths(max(Date.NumMonth),-1) but it is giving date format like dec-1899.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can anyone please help ?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank You&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jul 2020 10:37:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Calculating-M-1-and-12-rolling-months/m-p/1726421#M55370</guid>
      <dc:creator>Aspiring_Developer</dc:creator>
      <dc:date>2020-07-09T10:37:53Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating M-1 and 12 rolling months</title>
      <link>https://community.qlik.com/t5/App-Development/Calculating-M-1-and-12-rolling-months/m-p/1726433#M55371</link>
      <description>&lt;P&gt;Addmonths function requires date field like below. which will give you same date last month.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Addmonths(Date(Today()),-1)&lt;/P&gt;&lt;P&gt;examples&lt;/P&gt;&lt;P&gt;&lt;A href="https://help.qlik.com/en-US/qlikview/November2017/Subsystems/Client/Content/Scripting/DateAndTimeFunctions/addmonths.htm" target="_blank"&gt;https://help.qlik.com/en-US/qlikview/November2017/Subsystems/Client/Content/Scripting/DateAndTimeFunctions/addmonths.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;share some sample file&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jul 2020 11:09:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Calculating-M-1-and-12-rolling-months/m-p/1726433#M55371</guid>
      <dc:creator>arulsettu</dc:creator>
      <dc:date>2020-07-09T11:09:37Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating M-1 and 12 rolling months</title>
      <link>https://community.qlik.com/t5/App-Development/Calculating-M-1-and-12-rolling-months/m-p/1726461#M55375</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/41208"&gt;@arulsettu&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried using add months&lt;/P&gt;&lt;P&gt;Addmonths(max(Date),-1)&amp;nbsp; and it gives output 01/05/2020- which is correct as my max month is june.&lt;/P&gt;&lt;P&gt;But when i am passing the same in the expression and select any month from the filter, it is returning me the current month value instead of previous month.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please see the expression:-&lt;/P&gt;&lt;P&gt;=sum({&amp;lt;Indicateur.Code = {'PO.1.701'},Date.Year=,[Date.MonthEnd]=, NewTestvb1,[Date.MonthName]=, Date={'=$(=(addmonths(max(Date),-1)))'}&amp;gt;} Indicateur.Value)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It is giving me the output but when i select june2020, it should give me the value of May2020 but it is giving&amp;nbsp; me the value of June only.&lt;/P&gt;&lt;P&gt;Please suggest.&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jul 2020 11:53:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Calculating-M-1-and-12-rolling-months/m-p/1726461#M55375</guid>
      <dc:creator>Aspiring_Developer</dc:creator>
      <dc:date>2020-07-09T11:53:31Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating M-1 and 12 rolling months</title>
      <link>https://community.qlik.com/t5/App-Development/Calculating-M-1-and-12-rolling-months/m-p/1726464#M55376</link>
      <description>&lt;P&gt;Can you share sample app&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jul 2020 11:58:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Calculating-M-1-and-12-rolling-months/m-p/1726464#M55376</guid>
      <dc:creator>arulsettu</dc:creator>
      <dc:date>2020-07-09T11:58:42Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating M-1 and 12 rolling months</title>
      <link>https://community.qlik.com/t5/App-Development/Calculating-M-1-and-12-rolling-months/m-p/1726685#M55388</link>
      <description>&lt;P&gt;Data Set&lt;/P&gt;&lt;P&gt;LOAD SITE.REFERENCE,&lt;BR /&gt;Cle_Fichier,&lt;BR /&gt;Fichier,&lt;BR /&gt;%Key_Date,&lt;BR /&gt;Indicateur.Code,&lt;BR /&gt;Indicateur.Name,&lt;BR /&gt;Indicateur.Value,&lt;BR /&gt;Indicateur.ValueConso,&lt;BR /&gt;BU.REFERENCE,&lt;BR /&gt;DIVISION.REFERENCE,&lt;BR /&gt;GROUPE.REFERENCE,&lt;BR /&gt;MoisReference&lt;BR /&gt;FROM&lt;BR /&gt;[Y:\POG_Sources_Documents\HR Divisions Scorecard\Data\Base_QVD\Fact_NewQS.qvd]&lt;BR /&gt;(qvd);&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;LOAD %Key_Date,&lt;BR /&gt;Date,&lt;BR /&gt;Date(Date,'MMM-YY') as NewTestvb1,&lt;BR /&gt;Date(Date, 'DD/MM/YYYY') as Addmonths_Date,&lt;BR /&gt;num(Date) as new,&lt;BR /&gt;New_Date,&lt;BR /&gt;Date.Month,&lt;BR /&gt;Date.NumMonth,&lt;BR /&gt;Date.MonthName,&lt;BR /&gt;Date.PreviousYearMonthName,&lt;BR /&gt;Date.PreviousMonthName,&lt;BR /&gt;Date.NextMonthName,&lt;BR /&gt;[Date.NextMonthName+1],&lt;BR /&gt;Date.Year,&lt;BR /&gt;Date.QuarterName,&lt;BR /&gt;Date.Quarter,&lt;BR /&gt;Date.MonthEnd,&lt;BR /&gt;Date.NextMonthEnd,&lt;BR /&gt;[Date.NextMonthEnd+1],&lt;BR /&gt;Date.PreviousMonthEnd,&lt;BR /&gt;Date.PreviousYearMonthEnd,&lt;BR /&gt;Date.YearStart,&lt;BR /&gt;Date.PreviousYearStart&lt;BR /&gt;FROM&lt;BR /&gt;[Y:\POG_Sources_Documents\HR Divisions Scorecard\Data\Base_QVD\Time_QS.qvd]&lt;BR /&gt;(qvd)&lt;BR /&gt;where day(Date)=1;&lt;/P&gt;&lt;P&gt;i have converted the date into num and passed the below expression:-&lt;/P&gt;&lt;P&gt;=Sum({&amp;lt;Indicateur.Code = {'PO.1.701'},new={'=$(=num(addmonths(max(new),-1)))'}&amp;gt;} Indicateur.Value)&lt;/P&gt;&lt;P&gt;This should return me the value only for May2020&amp;nbsp; but it giving me the overall value.&lt;/P&gt;&lt;P&gt;Please help&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jul 2020 05:23:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Calculating-M-1-and-12-rolling-months/m-p/1726685#M55388</guid>
      <dc:creator>Aspiring_Developer</dc:creator>
      <dc:date>2020-07-10T05:23:23Z</dc:date>
    </item>
  </channel>
</rss>

