<?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 set analysis and dates range in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/set-analysis-and-dates-range/m-p/1013740#M343782</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to use the&amp;nbsp; set analysis to evaluate a sum between two dates.&lt;/P&gt;&lt;P&gt;I set two variables and my [Posting Date] field is numeric.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vMonthStart =Num(MonthStart(AddMonths(Only(MonthYear),1)))&lt;/P&gt;&lt;P&gt;vMonthStop =Num(AddMonths(Only(MonthYear),-11))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm using this expression :&lt;/P&gt;&lt;P&gt;=Sum({&lt;STRONG&gt;1&lt;/STRONG&gt;&amp;lt;[Posting Date]={"&amp;gt;$(&lt;SPAN style="font-size: 13.3333330154419px;"&gt;vMonthStart&lt;/SPAN&gt;) &amp;lt;=$(&lt;SPAN style="font-size: 13.3333330154419px;"&gt;vMonthStop&lt;/SPAN&gt;)"}&amp;gt;} [Line Amount (LCY)])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The purpose is to evaluate the sum for the past 12 months (selected MonthYear, and only one, included) but for now the sum isn't good.&lt;/P&gt;&lt;P&gt;I use a textbox to verify the variables and they seem right.&lt;/P&gt;&lt;P&gt;Example :&lt;/P&gt;&lt;P&gt;Selecting &lt;SPAN style="font-size: 13.3333330154419px;"&gt;MonthYear to &lt;/SPAN&gt;&lt;STRONG&gt;dec.-2015&lt;/STRONG&gt; give me &lt;SPAN style="font-size: 13.3333330154419px;"&gt;vMonthStart = &lt;STRONG&gt;42370&lt;/STRONG&gt; (01/01/2016) and &lt;SPAN style="font-size: 13.3333330154419px;"&gt;vMonthStop = &lt;STRONG&gt;42005&lt;/STRONG&gt; (01/01/2015) which is correct but the sum is still false.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As a reference i'm using this expression Sum({1&amp;lt;Year={$(vYear)}&amp;gt;}[Line Amount (LCY)])) and in that case the sum is correct.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I looked at countless community discussions but none fix my problem, and I obviously don't see or understand what I'm missing here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In advance, thanks for you help and sorry for my english mistakes ... not native. ^^&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 11 Feb 2016 11:39:44 GMT</pubDate>
    <dc:creator />
    <dc:date>2016-02-11T11:39:44Z</dc:date>
    <item>
      <title>set analysis and dates range</title>
      <link>https://community.qlik.com/t5/QlikView/set-analysis-and-dates-range/m-p/1013740#M343782</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to use the&amp;nbsp; set analysis to evaluate a sum between two dates.&lt;/P&gt;&lt;P&gt;I set two variables and my [Posting Date] field is numeric.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vMonthStart =Num(MonthStart(AddMonths(Only(MonthYear),1)))&lt;/P&gt;&lt;P&gt;vMonthStop =Num(AddMonths(Only(MonthYear),-11))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm using this expression :&lt;/P&gt;&lt;P&gt;=Sum({&lt;STRONG&gt;1&lt;/STRONG&gt;&amp;lt;[Posting Date]={"&amp;gt;$(&lt;SPAN style="font-size: 13.3333330154419px;"&gt;vMonthStart&lt;/SPAN&gt;) &amp;lt;=$(&lt;SPAN style="font-size: 13.3333330154419px;"&gt;vMonthStop&lt;/SPAN&gt;)"}&amp;gt;} [Line Amount (LCY)])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The purpose is to evaluate the sum for the past 12 months (selected MonthYear, and only one, included) but for now the sum isn't good.&lt;/P&gt;&lt;P&gt;I use a textbox to verify the variables and they seem right.&lt;/P&gt;&lt;P&gt;Example :&lt;/P&gt;&lt;P&gt;Selecting &lt;SPAN style="font-size: 13.3333330154419px;"&gt;MonthYear to &lt;/SPAN&gt;&lt;STRONG&gt;dec.-2015&lt;/STRONG&gt; give me &lt;SPAN style="font-size: 13.3333330154419px;"&gt;vMonthStart = &lt;STRONG&gt;42370&lt;/STRONG&gt; (01/01/2016) and &lt;SPAN style="font-size: 13.3333330154419px;"&gt;vMonthStop = &lt;STRONG&gt;42005&lt;/STRONG&gt; (01/01/2015) which is correct but the sum is still false.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As a reference i'm using this expression Sum({1&amp;lt;Year={$(vYear)}&amp;gt;}[Line Amount (LCY)])) and in that case the sum is correct.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I looked at countless community discussions but none fix my problem, and I obviously don't see or understand what I'm missing here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In advance, thanks for you help and sorry for my english mistakes ... not native. ^^&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Feb 2016 11:39:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/set-analysis-and-dates-range/m-p/1013740#M343782</guid>
      <dc:creator />
      <dc:date>2016-02-11T11:39:44Z</dc:date>
    </item>
    <item>
      <title>Re: set analysis and dates range</title>
      <link>https://community.qlik.com/t5/QlikView/set-analysis-and-dates-range/m-p/1013741#M343783</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your vMonthStart is larger than vMonthStop, so you won't select the range of dates between these two values, but the complement, AFAIR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think you need to exchange your definitions of Start and Stop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Feb 2016 12:40:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/set-analysis-and-dates-range/m-p/1013741#M343783</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-02-11T12:40:28Z</dc:date>
    </item>
  </channel>
</rss>

