<?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 What's wrong with this Set analysis with Date and Date# in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/What-s-wrong-with-this-Set-analysis-with-Date-and-Date/m-p/788394#M278795</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's the expression I try to use to calculate sales of last month&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=sum({&amp;lt;Date={"$(=date(addmonths(date#(Month&amp;amp;'/'&amp;amp;Year ,'MMM/YYYY'),-1),'MM/YYYY'))"}&amp;gt;}[sales])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The expression: date(addmonths(date#(Month&amp;amp;'/'&amp;amp;Year ,'MMM/YYYY'),-1),'MM/YYYY') gives the right result '01/2015'&lt;/P&gt;&lt;P&gt;and: sum({&amp;lt;Date={"01/2015"}&amp;gt;}[sales]) also gives the right result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;however it doesn't work if I combine them.&amp;nbsp; &lt;/P&gt;&lt;P&gt;Can you advise please? THanks a lot!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 25 Feb 2015 11:58:37 GMT</pubDate>
    <dc:creator />
    <dc:date>2015-02-25T11:58:37Z</dc:date>
    <item>
      <title>What's wrong with this Set analysis with Date and Date#</title>
      <link>https://community.qlik.com/t5/QlikView/What-s-wrong-with-this-Set-analysis-with-Date-and-Date/m-p/788394#M278795</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's the expression I try to use to calculate sales of last month&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=sum({&amp;lt;Date={"$(=date(addmonths(date#(Month&amp;amp;'/'&amp;amp;Year ,'MMM/YYYY'),-1),'MM/YYYY'))"}&amp;gt;}[sales])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The expression: date(addmonths(date#(Month&amp;amp;'/'&amp;amp;Year ,'MMM/YYYY'),-1),'MM/YYYY') gives the right result '01/2015'&lt;/P&gt;&lt;P&gt;and: sum({&amp;lt;Date={"01/2015"}&amp;gt;}[sales]) also gives the right result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;however it doesn't work if I combine them.&amp;nbsp; &lt;/P&gt;&lt;P&gt;Can you advise please? THanks a lot!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Feb 2015 11:58:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/What-s-wrong-with-this-Set-analysis-with-Date-and-Date/m-p/788394#M278795</guid>
      <dc:creator />
      <dc:date>2015-02-25T11:58:37Z</dc:date>
    </item>
    <item>
      <title>Re: What's wrong with this Set analysis with Date and Date#</title>
      <link>https://community.qlik.com/t5/QlikView/What-s-wrong-with-this-Set-analysis-with-Date-and-Date/m-p/788395#M278796</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What is the format of your Date field?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Feb 2015 12:02:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/What-s-wrong-with-this-Set-analysis-with-Date-and-Date/m-p/788395#M278796</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2015-02-25T12:02:01Z</dc:date>
    </item>
    <item>
      <title>Re: What's wrong with this Set analysis with Date and Date#</title>
      <link>https://community.qlik.com/t5/QlikView/What-s-wrong-with-this-Set-analysis-with-Date-and-Date/m-p/788396#M278797</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;the format of Date field is "DD/MM/YYYY"&lt;/P&gt;&lt;P&gt;Month format= 'Jan','Feb' etc&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Feb 2015 12:03:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/What-s-wrong-with-this-Set-analysis-with-Date-and-Date/m-p/788396#M278797</guid>
      <dc:creator />
      <dc:date>2015-02-25T12:03:51Z</dc:date>
    </item>
    <item>
      <title>Re: What's wrong with this Set analysis with Date and Date#</title>
      <link>https://community.qlik.com/t5/QlikView/What-s-wrong-with-this-Set-analysis-with-Date-and-Date/m-p/788397#M278798</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Then how can you compare&lt;/P&gt;&lt;P&gt;DD/MM/YYYY with MM/YYYY ?&lt;/P&gt;&lt;P&gt;Below is wrong...&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;sum({&amp;lt;DD/MM/YYYY={"MM/YYYY"}&amp;gt;}[sales]) &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Feb 2015 12:06:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/What-s-wrong-with-this-Set-analysis-with-Date-and-Date/m-p/788397#M278798</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2015-02-25T12:06:04Z</dc:date>
    </item>
    <item>
      <title>Re: What's wrong with this Set analysis with Date and Date#</title>
      <link>https://community.qlik.com/t5/QlikView/What-s-wrong-with-this-Set-analysis-with-Date-and-Date/m-p/788398#M278799</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Both of them are Date, no? Could you please explain? THanks&lt;/P&gt;&lt;P&gt;How should I modify the set analysis so I get the sales of January?&lt;/P&gt;&lt;P&gt;Do i have to write sum({&amp;lt;Year={$(=Year(addmonths(Date#(Month&amp;amp;'/'&amp;amp;Year ,'MMM/YYYY'),-1)))},Month={$(=Month(addmonths(Date#(Month&amp;amp;'/'&amp;amp;Year ,'MMM/YYYY'),-1)))}&amp;gt;}sales)?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Feb 2015 12:13:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/What-s-wrong-with-this-Set-analysis-with-Date-and-Date/m-p/788398#M278799</guid>
      <dc:creator />
      <dc:date>2015-02-25T12:13:22Z</dc:date>
    </item>
    <item>
      <title>Re: What's wrong with this Set analysis with Date and Date#</title>
      <link>https://community.qlik.com/t5/QlikView/What-s-wrong-with-this-Set-analysis-with-Date-and-Date/m-p/788399#M278800</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;=SUM({&amp;lt;Date = {'&amp;gt;=$(&lt;SPAN style="font-size: 13.3333330154419px;"&gt;=Date(MonthStart(AddMonths(Today(),-1)),'DD/MM/YYYY')&lt;/SPAN&gt;)&amp;lt;=$(=&lt;SPAN style="font-size: 13.3333330154419px;"&gt;Date(MonthEnd(AddMonths(Today(),-1)),'DD/MM/YYYY')&lt;/SPAN&gt;)'}&amp;gt;}sales)&lt;/SPAN&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;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;or&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;=SUM({&amp;lt;Date = {'&amp;gt;=$(&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;=Date(MonthStart(AddMonths(Max(Date),-1)),'DD/MM/YYYY')&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;)&amp;lt;=$(=&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;Date(MonthEnd(AddMonths(Max(Date),-1)),'DD/MM/YYYY')&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;)'}&amp;gt;}sales)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Feb 2015 12:18:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/What-s-wrong-with-this-Set-analysis-with-Date-and-Date/m-p/788399#M278800</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2015-02-25T12:18:20Z</dc:date>
    </item>
  </channel>
</rss>

