<?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: Calculate LMTD in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Calculate-LMTD/m-p/553882#M206926</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;=Sum({&amp;lt;FinYear=,FinMonthName=,FinancialYear=,FinQuarter=, DateField={"&amp;gt;=$(=Date(monthstart(vMaxDate,-1)))&amp;lt;=$(=Date(monthend(vMaxDate)))"}&amp;gt;}sa&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;les)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vMaxPrvDate=Date(max(CommonDateField),'DD/MM/YYYY')&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 14 Oct 2013 10:55:16 GMT</pubDate>
    <dc:creator />
    <dc:date>2013-10-14T10:55:16Z</dc:date>
    <item>
      <title>Calculate LMTD</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-LMTD/m-p/553880#M206924</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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; I want to Calculate Last Month till Date Sales. I have Selected 12 Oct -13 . I want to Calculate 01-Sep to 11-Sep-13.. Can u Please Suggest me the query&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Oct 2013 10:35:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-LMTD/m-p/553880#M206924</guid>
      <dc:creator />
      <dc:date>2013-10-14T10:35:42Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate LMTD</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-LMTD/m-p/553881#M206925</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this one,&lt;/P&gt;&lt;P&gt;date={'&amp;gt;=monthstart(max(date),-1)&amp;lt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;MakeDate(year(max(Date)),Month(Max(Date))-1,day(max(Date)))&lt;/SPAN&gt;'}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Oct 2013 10:47:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-LMTD/m-p/553881#M206925</guid>
      <dc:creator />
      <dc:date>2013-10-14T10:47:40Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate LMTD</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-LMTD/m-p/553882#M206926</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;=Sum({&amp;lt;FinYear=,FinMonthName=,FinancialYear=,FinQuarter=, DateField={"&amp;gt;=$(=Date(monthstart(vMaxDate,-1)))&amp;lt;=$(=Date(monthend(vMaxDate)))"}&amp;gt;}sa&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;les)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vMaxPrvDate=Date(max(CommonDateField),'DD/MM/YYYY')&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Oct 2013 10:55:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-LMTD/m-p/553882#M206926</guid>
      <dc:creator />
      <dc:date>2013-10-14T10:55:16Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate LMTD</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-LMTD/m-p/553883#M206927</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;maybe not the most elegant but I would try substracting the current month sales to to the total sales in the year, and then show the result:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=num(sum({&amp;lt;Year={$(=Max(Year))}&amp;gt; } SalesAmount))&lt;/P&gt;&lt;P&gt; -&lt;/P&gt;&lt;P&gt; num(sum({&amp;lt;Year={$(=Max(Year))}, MonthNum={$(=max(MonthNum)-1)} &amp;gt; } SalesAmount))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Oct 2013 11:17:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-LMTD/m-p/553883#M206927</guid>
      <dc:creator>salto</dc:creator>
      <dc:date>2013-10-14T11:17:57Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate LMTD</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-LMTD/m-p/553884#M206928</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Can U please explain the Expression. Because I have Date, Month , Year, Values Only&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Oct 2013 12:38:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-LMTD/m-p/553884#M206928</guid>
      <dc:creator />
      <dc:date>2013-10-14T12:38:11Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate LMTD</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-LMTD/m-p/553885#M206929</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;I think this expression using set analysis will work :&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;sum( {&amp;lt; date={"&amp;gt;=$(=monthstart(max&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;({1}&lt;/SPAN&gt;date),-1)) &amp;lt;$(=&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;max({1}date))"&lt;/SPAN&gt;} &amp;gt;} SALES)&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;we select the date for which to calculate the sum of sales.&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Regards&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Stéphane&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Oct 2013 12:50:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-LMTD/m-p/553885#M206929</guid>
      <dc:creator />
      <dc:date>2013-10-14T12:50:53Z</dc:date>
    </item>
  </channel>
</rss>

