<?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 MTD Position using seperate daily values in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Calculate-MTD-Position-using-seperate-daily-values/m-p/552584#M206400</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;If the expression provided works for the latest day, then I think this should work for MTD for the latest month:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Sum({&amp;lt;C_Month={'$(=Month(max(C_date)))'}, C_date =&amp;gt;}Value)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And this should work for the previous month&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Sum({&amp;lt;C_Month={'$(=Month(max(C_date), -1))'}, C_date =&amp;gt;}Value)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 23 Sep 2013 11:53:19 GMT</pubDate>
    <dc:creator>jonathandienst</dc:creator>
    <dc:date>2013-09-23T11:53:19Z</dc:date>
    <item>
      <title>Calculate MTD Position using seperate daily values</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-MTD-Position-using-seperate-daily-values/m-p/552583#M206399</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-family: Calibri; font-size: 11pt;"&gt;Hi,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Calibri; font-size: 11pt;"&gt;I am trying to create an expression(s) to calculate MTD values and compare them to the previous month.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Calibri; font-size: 11pt;"&gt;My data is based on daily positions and not rolled up positions, i.e. 01 Jan 2013 will have its own value and 02 Jan 2013 will also have its own value and so on.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Calibri; font-size: 11pt;"&gt;I have tried a few expressions, but they don't correctly give me what I want to see. For example&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Calibri; color: blue; font-size: 11pt;"&gt;For current month &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Calibri; font-size: 11pt;"&gt;Sum&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Calibri; font-size: 11pt;"&gt;({&amp;lt;&lt;SPAN style="color: maroon;"&gt;C_Month&lt;/SPAN&gt;={'$(=Month(max(C_date)))'}, C_&lt;SPAN style="color: maroon;"&gt;date&lt;/SPAN&gt; = {'$(=max(C_date))'} &amp;gt;}&lt;SPAN style="color: maroon;"&gt;Value&lt;/SPAN&gt;) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Calibri; font-size: 11pt;"&gt;This gives me the value for the latest day only, while I actually want the sum of everything to the latest latest day i.e. 1st of any month to the latest day available. Once I get this I can then create a similar expression and compare it to the same time in the previous month i.e. &lt;STRONG&gt;My overall aim is to compare for example from 01/06/2013 – 15/06/2013 to 01/05/2013 to 15/05/2013&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Calibri; font-size: 11pt;"&gt;&lt;SPAN style="font-family: Calibri; font-size: 11pt;"&gt;Any help to get this working as intended will be greatly appreciated.&lt;/SPAN&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Calibri; font-size: 11pt;"&gt;Many thanks&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Sep 2013 10:33:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-MTD-Position-using-seperate-daily-values/m-p/552583#M206399</guid>
      <dc:creator />
      <dc:date>2013-09-23T10:33:14Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate MTD Position using seperate daily values</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-MTD-Position-using-seperate-daily-values/m-p/552584#M206400</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;If the expression provided works for the latest day, then I think this should work for MTD for the latest month:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Sum({&amp;lt;C_Month={'$(=Month(max(C_date)))'}, C_date =&amp;gt;}Value)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And this should work for the previous month&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Sum({&amp;lt;C_Month={'$(=Month(max(C_date), -1))'}, C_date =&amp;gt;}Value)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Sep 2013 11:53:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-MTD-Position-using-seperate-daily-values/m-p/552584#M206400</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2013-09-23T11:53:19Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate MTD Position using seperate daily values</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-MTD-Position-using-seperate-daily-values/m-p/552585#M206401</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jonathan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your suggestion really only works for the current month. If a user makes a selection and wants to see what happened in July against June, it shows the full month values, rather than the intra month values that I want.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ideally I would like to see a comparison for 1st June to 15th June and 1st July to 15th July and so on, which will basically be a sum of the values recorded for all those days.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Sep 2013 19:19:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-MTD-Position-using-seperate-daily-values/m-p/552585#M206401</guid>
      <dc:creator />
      <dc:date>2013-09-23T19:19:21Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate MTD Position using seperate daily values</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-MTD-Position-using-seperate-daily-values/m-p/552586#M206402</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you need to apply the same MTD logic to prior months, then you need to formulate the search condition that will apply separately to month(C_date) and Day(C_Date). Something long the following lines (can't guarantee the exact syntax, just a direction):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Sum({&amp;lt; C_Date={"=(num(C_Month)=num($(=Month(max(C_date)))) and&amp;nbsp; (day(C_Date) &amp;lt;= &lt;EM style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;day(max(C_Date))&lt;/EM&gt;)"}, C_date =&amp;gt;} Value)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;So, in a nutshell, you are selecting dates that have a month that's equal to the highest month and a date that's less or equal to the highest available date. Tweak it to your specific needs.&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;best,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Oleg Troyansky&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.masterssummit.com/"&gt;www.masterssummit.com&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Sep 2013 22:33:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-MTD-Position-using-seperate-daily-values/m-p/552586#M206402</guid>
      <dc:creator>Oleg_Troyansky</dc:creator>
      <dc:date>2013-09-23T22:33:26Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate MTD Position using seperate daily values</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-MTD-Position-using-seperate-daily-values/m-p/552587#M206403</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try This,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: Calibri; font-size: 15px;"&gt;C_&lt;/SPAN&gt;&lt;SPAN style="font-size: 15px; font-family: Calibri; color: maroon;"&gt;date&lt;/SPAN&gt;={'&amp;gt;=$(VstartMonth)&amp;lt;=$(vMaxDate)'}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Create 2 Variable please find below tha values of the variables................&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;VstartMonth=Date(MonthStart(vMaxDate),'DD/MM/YYYY')&lt;/P&gt;&lt;P&gt;vMaxDate==Date(max(&lt;SPAN style="color: #3d3d3d; font-family: Calibri; font-size: 15px;"&gt;C_&lt;/SPAN&gt;&lt;SPAN style="font-size: 15px; font-family: Calibri; color: maroon;"&gt;date&lt;/SPAN&gt;),'DD/MM/YYYY')&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Sep 2013 05:18:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-MTD-Position-using-seperate-daily-values/m-p/552587#M206403</guid>
      <dc:creator />
      <dc:date>2013-09-24T05:18:22Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate MTD Position using seperate daily values</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-MTD-Position-using-seperate-daily-values/m-p/552588#M206404</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;Find the attached Application which has both MTD &amp;amp; Previous MTD expressions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Sep 2013 06:14:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-MTD-Position-using-seperate-daily-values/m-p/552588#M206404</guid>
      <dc:creator />
      <dc:date>2013-09-24T06:14:07Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate MTD Position using seperate daily values</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-MTD-Position-using-seperate-daily-values/m-p/552589#M206405</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have you try this or not,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Try This,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-style: inherit; font-size: 15px; font-family: Calibri;"&gt;C_&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 15px; font-family: Calibri; color: maroon;"&gt;date&lt;/SPAN&gt;={'&amp;gt;=$(VstartMonth)&amp;lt;=$(vMaxDate)'}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Create 2 Variable please find below tha values of the variables................&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;VstartMonth=Date(MonthStart(vMaxDate),'DD/MM/YYYY')&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;vMaxDate==Date(max(&lt;SPAN style="font-style: inherit; font-size: 15px; font-family: Calibri;"&gt;C_&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 15px; font-family: Calibri; color: maroon;"&gt;date&lt;/SPAN&gt;),'DD/MM/YYYY')&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Sep 2013 12:13:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-MTD-Position-using-seperate-daily-values/m-p/552589#M206405</guid>
      <dc:creator />
      <dc:date>2013-09-24T12:13:59Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate MTD Position using seperate daily values</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-MTD-Position-using-seperate-daily-values/m-p/552590#M206406</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Bhaskar, that was exactly what I needed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Sep 2013 13:29:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-MTD-Position-using-seperate-daily-values/m-p/552590#M206406</guid>
      <dc:creator />
      <dc:date>2013-09-24T13:29:17Z</dc:date>
    </item>
  </channel>
</rss>

