<?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: Retrieving previous months data based on selection in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Retrieving-previous-months-data-based-on-selection/m-p/921378#M653014</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Date field in your sample is a text field. Reload the application converting the date field into a proper date field (numeric at the backend). You may try like:&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date(Date#(period, 'MM/DD/YYYY')) as Date,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Month(Date#(period, 'MM/DD/YYYY')) as Month&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;...;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then at the front end try like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum({&amp;lt;Date={"&amp;gt;=MonthStart(Max(Date),-1) &amp;lt;=MonthEnd(Max(Date),-1)"}&amp;gt;}spend)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 30 Jul 2015 09:54:47 GMT</pubDate>
    <dc:creator>tresB</dc:creator>
    <dc:date>2015-07-30T09:54:47Z</dc:date>
    <item>
      <title>Retrieving previous months data based on selection</title>
      <link>https://community.qlik.com/t5/QlikView/Retrieving-previous-months-data-based-on-selection/m-p/921374#M653010</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;I got stuck in a situation where the client has a MTD( Which is not exactly a MTD calculation)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Where when the user selects a month the MTD value has to be calculated not form first of month to selected date but it has to show previous month data irrespective of what ever date is selected (To avoid the complexity and confusion we are just using month instead Date)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help me on this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Kumar&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-users/47027"&gt;dvqlikview&lt;/A&gt;‌&lt;A href="https://community.qlik.com/qlik-users/39765"&gt;cheenujanakiram&lt;/A&gt;‌&lt;A href="https://community.qlik.com/qlik-users/96544"&gt;gwassenaar&lt;/A&gt;‌&lt;A href="https://community.qlik.com/qlik-users/23109"&gt;jagan&lt;/A&gt;‌&lt;A href="https://community.qlik.com/space/2051"&gt;App Development&lt;/A&gt;‌&lt;A href="https://community.qlik.com/space/2061"&gt;Scripting&lt;/A&gt;‌&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can you guys please guide me on this please&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Jul 2015 09:20:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Retrieving-previous-months-data-based-on-selection/m-p/921374#M653010</guid>
      <dc:creator />
      <dc:date>2015-07-30T09:20:50Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieving previous months data based on selection</title>
      <link>https://community.qlik.com/t5/QlikView/Retrieving-previous-months-data-based-on-selection/m-p/921375#M653011</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum({&amp;lt;Date = { '&amp;gt;=$(monthstart(Addmonths(Max(Date),-1))&amp;lt;=&lt;SPAN style="font-size: 13.3333330154419px;"&gt;monthend(Addmonths(Max(Date),-1)) )'} &amp;gt;} Value)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Jul 2015 09:31:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Retrieving-previous-months-data-based-on-selection/m-p/921375#M653011</guid>
      <dc:creator>qumniusomnius</dc:creator>
      <dc:date>2015-07-30T09:31:20Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieving previous months data based on selection</title>
      <link>https://community.qlik.com/t5/QlikView/Retrieving-previous-months-data-based-on-selection/m-p/921376#M653012</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It would majorly depend on your Date/Month field data type. Try to share your sample qvw.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Jul 2015 09:34:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Retrieving-previous-months-data-based-on-selection/m-p/921376#M653012</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2015-07-30T09:34:39Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieving previous months data based on selection</title>
      <link>https://community.qlik.com/t5/QlikView/Retrieving-previous-months-data-based-on-selection/m-p/921377#M653013</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Attached the QVW to the orginal post&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Jul 2015 09:41:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Retrieving-previous-months-data-based-on-selection/m-p/921377#M653013</guid>
      <dc:creator />
      <dc:date>2015-07-30T09:41:10Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieving previous months data based on selection</title>
      <link>https://community.qlik.com/t5/QlikView/Retrieving-previous-months-data-based-on-selection/m-p/921378#M653014</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Date field in your sample is a text field. Reload the application converting the date field into a proper date field (numeric at the backend). You may try like:&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date(Date#(period, 'MM/DD/YYYY')) as Date,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Month(Date#(period, 'MM/DD/YYYY')) as Month&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;...;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then at the front end try like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum({&amp;lt;Date={"&amp;gt;=MonthStart(Max(Date),-1) &amp;lt;=MonthEnd(Max(Date),-1)"}&amp;gt;}spend)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Jul 2015 09:54:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Retrieving-previous-months-data-based-on-selection/m-p/921378#M653014</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2015-07-30T09:54:47Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieving previous months data based on selection</title>
      <link>https://community.qlik.com/t5/QlikView/Retrieving-previous-months-data-based-on-selection/m-p/921379#M653015</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;are you speaking about the data field in the Master Calendar???&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Jul 2015 09:58:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Retrieving-previous-months-data-based-on-selection/m-p/921379#M653015</guid>
      <dc:creator />
      <dc:date>2015-07-30T09:58:27Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieving previous months data based on selection</title>
      <link>https://community.qlik.com/t5/QlikView/Retrieving-previous-months-data-based-on-selection/m-p/921380#M653016</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I see only one date field called &lt;STRONG&gt;period&lt;/STRONG&gt; in your sample qvw.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Jul 2015 10:03:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Retrieving-previous-months-data-based-on-selection/m-p/921380#M653016</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2015-07-30T10:03:53Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieving previous months data based on selection</title>
      <link>https://community.qlik.com/t5/QlikView/Retrieving-previous-months-data-based-on-selection/m-p/921381#M653017</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Try like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Change your script like below&lt;/P&gt;&lt;P&gt;LOAD [Supplier Name], &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Commodity Manager], &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Plant, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date(period) AS period, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; spend, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PPV&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;Sample.xlsx&lt;/P&gt;&lt;P&gt;(ooxml, embedded labels, table is Sheet1);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P dir="ltr"&gt;&lt;SPAN dir="ltr" style="font-family: 'Segoe UI'; color: #000080; font-size: 10pt;"&gt;&lt;EM&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Expression:&lt;/P&gt;&lt;P&gt;sum({&amp;lt;period = {"&amp;gt;=$(monthstart(Addmonths(Max(period),-1)))&amp;lt;=monthend(Addmonths(Max(period),-1)) )"} &amp;gt;} spend)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Jul 2015 10:14:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Retrieving-previous-months-data-based-on-selection/m-p/921381#M653017</guid>
      <dc:creator>jagan</dc:creator>
      <dc:date>2015-07-30T10:14:48Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieving previous months data based on selection</title>
      <link>https://community.qlik.com/t5/QlikView/Retrieving-previous-months-data-based-on-selection/m-p/921382#M653018</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Did that...I believe the issue is fixed now..... Thanks every one for the help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Jul 2015 10:18:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Retrieving-previous-months-data-based-on-selection/m-p/921382#M653018</guid>
      <dc:creator />
      <dc:date>2015-07-30T10:18:47Z</dc:date>
    </item>
  </channel>
</rss>

