<?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 SV:Re: Set analysis with less than or equal in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-analysis-with-less-than-or-equal/m-p/218036#M71206</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That looks like the correct syntax to me.&lt;/P&gt;&lt;P&gt;I just tested it out on a sample app and it worked. Here is what I used:&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;Sum({&amp;lt;Date = {'&amp;lt;=$(=AddMonths(Date(Today()), -12))'}&amp;gt;}Amount)&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;The only difference seems to be the single quotes, but those shouldn't matter. &lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;I just refreshed and saw Michael's post, formatting could be your problem.&lt;/P&gt;&lt;P&gt;You should check out your dollar sign expansion by creating a chart and inserting the expression, but not giving it a label. Then when the chart is rendered, the label will be your expression with the dollar sign expansion evaluated. For mine, it shows:&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;Sum({&amp;lt;Date = {'&amp;lt;=7/8/2009'}&amp;gt;}Amount)&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;That should allow you to verify your date formats and syntax. You may need to add a format string to the Date function.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 08 Jul 2010 16:37:02 GMT</pubDate>
    <dc:creator />
    <dc:date>2010-07-08T16:37:02Z</dc:date>
    <item>
      <title>Set analysis with less than or equal</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-with-less-than-or-equal/m-p/218032#M71202</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've been struggling with this set analysis.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum(&lt;/P&gt;&lt;P&gt;$&amp;lt;&lt;/P&gt;&lt;P&gt;Month={$(=Month(Today()))},&lt;/P&gt;&lt;P&gt;Year={$(=max(Year)-1)},&lt;/P&gt;&lt;P&gt;InvoiceDate={"&amp;lt;=2009-07-04"}&lt;/P&gt;&lt;P&gt;&amp;gt;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;if(CurrNo=1,Invoice_NetPriceEUR,if(CurrNo=2,Invoice_NetPriceLocal,Invoice_NetPriceSE))&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;It does give me what I want but now I wants to replace the last row with: AddMonths(Date(Today()),-12).&lt;/P&gt;&lt;P&gt;Shouldn't this work?&lt;/P&gt;&lt;P&gt;InvoiceDate={$(&amp;lt;=AddMonths(Date(Today()),-12))}&lt;/P&gt;&lt;P&gt;I also tried a few variants but no luck. My best shot was:&lt;/P&gt;&lt;P&gt;InvoiceDate={"&amp;lt;="{$(=AddMonths(Date(Today()),-12)}&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for any help!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Jul 2010 14:36:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-with-less-than-or-equal/m-p/218032#M71202</guid>
      <dc:creator />
      <dc:date>2010-07-08T14:36:54Z</dc:date>
    </item>
    <item>
      <title>Set analysis with less than or equal</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-with-less-than-or-equal/m-p/218033#M71203</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;InvoiceDate={"&amp;lt;=$(=AddMonths(Date(Today()),-12)"}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Jul 2010 15:07:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-with-less-than-or-equal/m-p/218033#M71203</guid>
      <dc:creator />
      <dc:date>2010-07-08T15:07:17Z</dc:date>
    </item>
    <item>
      <title>SV:Re: Set analysis with less than or equal</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-with-less-than-or-equal/m-p/218034#M71204</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm sorry but that made no difference. Is the syntax correct?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Jul 2010 15:15:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-with-less-than-or-equal/m-p/218034#M71204</guid>
      <dc:creator />
      <dc:date>2010-07-08T15:15:56Z</dc:date>
    </item>
    <item>
      <title>SV:Re: Set analysis with less than or equal</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-with-less-than-or-equal/m-p/218035#M71205</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Hakan,&lt;/P&gt;&lt;P&gt;Syntax seems to be ok, but Date(Today()) and your actual date field may not be the same format, so I recommend you to&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;Date(InvoiceDate)&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Jul 2010 16:27:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-with-less-than-or-equal/m-p/218035#M71205</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2010-07-08T16:27:34Z</dc:date>
    </item>
    <item>
      <title>SV:Re: Set analysis with less than or equal</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-with-less-than-or-equal/m-p/218036#M71206</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That looks like the correct syntax to me.&lt;/P&gt;&lt;P&gt;I just tested it out on a sample app and it worked. Here is what I used:&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;Sum({&amp;lt;Date = {'&amp;lt;=$(=AddMonths(Date(Today()), -12))'}&amp;gt;}Amount)&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;The only difference seems to be the single quotes, but those shouldn't matter. &lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;I just refreshed and saw Michael's post, formatting could be your problem.&lt;/P&gt;&lt;P&gt;You should check out your dollar sign expansion by creating a chart and inserting the expression, but not giving it a label. Then when the chart is rendered, the label will be your expression with the dollar sign expansion evaluated. For mine, it shows:&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;Sum({&amp;lt;Date = {'&amp;lt;=7/8/2009'}&amp;gt;}Amount)&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;That should allow you to verify your date formats and syntax. You may need to add a format string to the Date function.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Jul 2010 16:37:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-with-less-than-or-equal/m-p/218036#M71206</guid>
      <dc:creator />
      <dc:date>2010-07-08T16:37:02Z</dc:date>
    </item>
    <item>
      <title>SV:Re: SV:Re: Set analysis with less than or equal</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-with-less-than-or-equal/m-p/218037#M71207</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you all for your assists. &lt;IMG alt="Yes" src="http://community.qlik.com/emoticons/emotion-21.gif" /&gt;&lt;/P&gt;&lt;P&gt;NMiller, I would be greatly happy if you would post your sample app for reference. I don't really understand how to use a chart with dollar sign expansion with my expression.&lt;/P&gt;&lt;P&gt;I am still in version 8.5.&lt;/P&gt;&lt;P&gt;Still I have problem with AddMonths function. I have isolated it and now this expression works:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;Sum({$&amp;lt;InvoiceDate={'&amp;lt;=$(Date(Today()))'}&amp;gt;}if(CurrNo=1,Invoice_NetPriceEUR,if(CurrNo=2,Invoice_NetPriceLocal,Invoice_NetPriceSE)))&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;I believe this verifies that InvoiceDate is a date? But still this expression gives me nothing:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;Sum({$&amp;lt;InvoiceDate={'&amp;lt;=$(AddMonths(Date(Today()),-12)'}&amp;gt;}if(CurrNo=1,Invoice_NetPriceEUR,if(CurrNo=2,Invoice_NetPriceLocal,Invoice_NetPriceSE)))&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;I do understand there is something fishy going on but for now I am stuck.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Jul 2010 15:46:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-with-less-than-or-equal/m-p/218037#M71207</guid>
      <dc:creator />
      <dc:date>2010-07-09T15:46:45Z</dc:date>
    </item>
    <item>
      <title>SV:Re: SV:Re: Set analysis with less than or equal</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-with-less-than-or-equal/m-p/218038#M71208</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I had an error in the expression - both suggestions worked out correct.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Jul 2010 14:55:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-with-less-than-or-equal/m-p/218038#M71208</guid>
      <dc:creator />
      <dc:date>2010-07-12T14:55:18Z</dc:date>
    </item>
  </channel>
</rss>

