<?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 Help with date SET analysis - previous month in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Help-with-date-SET-analysis-previous-month/m-p/1142769#M629142</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;I need some help, and this has probably been asked a million times before, I just cant get it to work. I need to write a SET analysis for the previous months value count, however I want to use a date range and avoid using variables:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Count({$&amp;lt;Lead_Created_date={"&amp;gt;=$(=addmonths(monthstart(max(Lead_Created_date)),-1))&amp;lt;=$(=addmonths(monthend(max(Lead_Created_date)),-1))"},OutcomeName={'Not interested'}&amp;gt;}Reference)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This doesnt return a value, however im sure the code is correct, the issue probably is that Lead_Created_date is a datetime field. Not sure if there is a way to solve this, can anyone help plz?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ridwaan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 25 Jul 2016 20:08:46 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2016-07-25T20:08:46Z</dc:date>
    <item>
      <title>Help with date SET analysis - previous month</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-date-SET-analysis-previous-month/m-p/1142769#M629142</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;I need some help, and this has probably been asked a million times before, I just cant get it to work. I need to write a SET analysis for the previous months value count, however I want to use a date range and avoid using variables:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Count({$&amp;lt;Lead_Created_date={"&amp;gt;=$(=addmonths(monthstart(max(Lead_Created_date)),-1))&amp;lt;=$(=addmonths(monthend(max(Lead_Created_date)),-1))"},OutcomeName={'Not interested'}&amp;gt;}Reference)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This doesnt return a value, however im sure the code is correct, the issue probably is that Lead_Created_date is a datetime field. Not sure if there is a way to solve this, can anyone help plz?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ridwaan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Jul 2016 20:08:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-date-SET-analysis-previous-month/m-p/1142769#M629142</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-07-25T20:08:46Z</dc:date>
    </item>
    <item>
      <title>Re: Help with date SET analysis - previous month</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-date-SET-analysis-previous-month/m-p/1142770#M629143</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check here:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-blogpost/4394"&gt;Dates in Set Analysis&lt;/A&gt;‌&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One of the issue I can think is that Lead_Created_date might have a different date field format causing format mis-match which would lead to non-desired results. Try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;Count({$&amp;lt;Lead_Created_date={"&amp;gt;=$(=&lt;SPAN style="color: #ff0000;"&gt;Date(&lt;/SPAN&gt;MonthStart(Max(Lead_Created_date), -1)&lt;SPAN style="color: #ff0000;"&gt;, 'DateFieldFormatHere')&lt;/SPAN&gt;)&amp;lt;=$(=&lt;SPAN style="color: #ff0000;"&gt;Date(&lt;/SPAN&gt;MonthEnd(Max(Lead_Created_date),-1)&lt;SPAN style="color: #ff0000;"&gt;, 'DateFieldFormatHere')&lt;/SPAN&gt;)"}, OutcomeName={'Not interested'}&amp;gt;} Reference)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Jul 2016 20:47:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-date-SET-analysis-previous-month/m-p/1142770#M629143</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-07-25T20:47:18Z</dc:date>
    </item>
  </channel>
</rss>

