<?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 MTD date issue ? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/MTD-date-issue/m-p/752616#M268179</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is no relation between these tables, but in the all the tables Used [Invoice Date] ...&lt;/P&gt;&lt;P&gt; I have created top customers report they are working fine on Invoice date, but i have created MTD using YrRollMonth with the Varible as vMthDt in Gross Margin (MTD Logic)..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;They are Separately working fine with their filters, but I need to use Invoice date &amp;amp; Year as Filters, Is this possible can any one help me...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AllInvoiceDate:&lt;/P&gt;&lt;P&gt;LOAD DISTINCT&lt;/P&gt;&lt;P&gt;&amp;nbsp; [Invoice Date],&lt;/P&gt;&lt;P&gt;&amp;nbsp; year([Invoice Date]) as [Invoice Year],&lt;/P&gt;&lt;P&gt;&amp;nbsp; month([Invoice Date]) as [Invoice Month]&lt;/P&gt;&lt;P&gt;RESIDENT Invoices;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Current_Rollmonth:&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;MonthName([Invoice Date]) As YrRollMonth&lt;/P&gt;&lt;P&gt;Resident Invoices&lt;/P&gt;&lt;P&gt;Where Year([Invoice Date]) = Year('$(vMaxDt)');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MaxInvoiceDt:&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;&amp;nbsp; max([Invoice Date]) As maxInvoiceDt&lt;/P&gt;&lt;P&gt;Resident Invoices;&lt;/P&gt;&lt;P&gt;Let vMaxDt = Date(Peek('maxInvoiceDt'));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Variable:&amp;nbsp;&amp;nbsp; vMthDt= Date(YrRollMonth)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 15 Nov 2014 06:51:04 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-11-15T06:51:04Z</dc:date>
    <item>
      <title>MTD date issue ?</title>
      <link>https://community.qlik.com/t5/QlikView/MTD-date-issue/m-p/752616#M268179</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is no relation between these tables, but in the all the tables Used [Invoice Date] ...&lt;/P&gt;&lt;P&gt; I have created top customers report they are working fine on Invoice date, but i have created MTD using YrRollMonth with the Varible as vMthDt in Gross Margin (MTD Logic)..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;They are Separately working fine with their filters, but I need to use Invoice date &amp;amp; Year as Filters, Is this possible can any one help me...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AllInvoiceDate:&lt;/P&gt;&lt;P&gt;LOAD DISTINCT&lt;/P&gt;&lt;P&gt;&amp;nbsp; [Invoice Date],&lt;/P&gt;&lt;P&gt;&amp;nbsp; year([Invoice Date]) as [Invoice Year],&lt;/P&gt;&lt;P&gt;&amp;nbsp; month([Invoice Date]) as [Invoice Month]&lt;/P&gt;&lt;P&gt;RESIDENT Invoices;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Current_Rollmonth:&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;MonthName([Invoice Date]) As YrRollMonth&lt;/P&gt;&lt;P&gt;Resident Invoices&lt;/P&gt;&lt;P&gt;Where Year([Invoice Date]) = Year('$(vMaxDt)');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MaxInvoiceDt:&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;&amp;nbsp; max([Invoice Date]) As maxInvoiceDt&lt;/P&gt;&lt;P&gt;Resident Invoices;&lt;/P&gt;&lt;P&gt;Let vMaxDt = Date(Peek('maxInvoiceDt'));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Variable:&amp;nbsp;&amp;nbsp; vMthDt= Date(YrRollMonth)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 15 Nov 2014 06:51:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/MTD-date-issue/m-p/752616#M268179</guid>
      <dc:creator />
      <dc:date>2014-11-15T06:51:04Z</dc:date>
    </item>
    <item>
      <title>Re: MTD date issue ?</title>
      <link>https://community.qlik.com/t5/QlikView/MTD-date-issue/m-p/752617#M268180</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am not sure what you are trying to achieve. Is it a sum of month to date? In this case you can create a flag for each transaction or in a calendar (AllInvoiceDate in your example).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the script:&lt;/P&gt;&lt;P&gt;if(InMonthToDate([Invoice Date].today(),0),1,0) as Flag_MTD&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then in your expression in the chart you can use:&lt;/P&gt;&lt;P&gt;sum({&amp;lt;Flag_MTD={1}&amp;gt;} Value)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to have a MTD value for any date in the history you should look into AsOf-calendar functions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Morgan Kejerhag&lt;/P&gt;&lt;P&gt;Senior Business Intelligence Consultant, Drake Analytics&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://www.drakeanalytics.se/"&gt;http://www.drakeanalytics.se&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 15 Nov 2014 10:07:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/MTD-date-issue/m-p/752617#M268180</guid>
      <dc:creator>morgankejerhag</dc:creator>
      <dc:date>2014-11-15T10:07:43Z</dc:date>
    </item>
  </channel>
</rss>

