<?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: Set Analysis Comparison with Variables in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Set-Analysis-Comparison-with-Variables/m-p/858067#M11853</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ahh that explains why the first expression worked and the second did not. Thanks very much for your prompt and concise response. Some of your previous posts have been very helpful, so thanks for that as well.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 30 Apr 2015 14:09:23 GMT</pubDate>
    <dc:creator />
    <dc:date>2015-04-30T14:09:23Z</dc:date>
    <item>
      <title>Set Analysis Comparison with Variables</title>
      <link>https://community.qlik.com/t5/App-Development/Set-Analysis-Comparison-with-Variables/m-p/858065#M11851</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 am attempting to use the following expression in a measure:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum({&amp;lt;Month = {'$(vCurrentMonth)'}&amp;gt;}IntakeBU)&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;sum({&amp;lt;Month = {'&amp;gt;= $(vCurrentMonth)'}&amp;gt;}IntakeValue)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;The first set statement before the minus sign works fine. The one after it always outputs to zero. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;The value of vCurrent month is month(today()).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;I have verified that with a sum(IntakeValue) is far greater than 0 with the appropriate months selected. Can anyone explain why this doe not work or recommend a work-around that does not involve hard-coding the values?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Thanks&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Apr 2015 13:40:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-Analysis-Comparison-with-Variables/m-p/858065#M11851</guid>
      <dc:creator />
      <dc:date>2015-04-30T13:40:41Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis Comparison with Variables</title>
      <link>https://community.qlik.com/t5/App-Development/Set-Analysis-Comparison-with-Variables/m-p/858066#M11852</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Try this:&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;change vCurrentMonth to =num(month(today()))&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;change your expression to:&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;sum({&amp;lt;Month = {'&amp;gt;=$(vCurrentMonth)&amp;lt;=&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;$(vCurrentMonth)&lt;/SPAN&gt;'}&amp;gt;}IntakeBU)&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;-&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;sum({&amp;lt;Month = {'&amp;gt;= $(vCurrentMonth)'}&amp;gt;}IntakeValue)&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;The cause is that $(vCurrentMonth) returns a string. The result is that you compare a numeric month value (because of the &amp;gt;= operator) with a string value. By changing the variable so that it return a number it's possible to use the &amp;gt;= and &amp;lt;= operators. To make the first part of the chart expression work I changed the modifier so it works with the number value of the variable.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Apr 2015 13:58:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-Analysis-Comparison-with-Variables/m-p/858066#M11852</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2015-04-30T13:58:04Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis Comparison with Variables</title>
      <link>https://community.qlik.com/t5/App-Development/Set-Analysis-Comparison-with-Variables/m-p/858067#M11853</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ahh that explains why the first expression worked and the second did not. Thanks very much for your prompt and concise response. Some of your previous posts have been very helpful, so thanks for that as well.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Apr 2015 14:09:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-Analysis-Comparison-with-Variables/m-p/858067#M11853</guid>
      <dc:creator />
      <dc:date>2015-04-30T14:09:23Z</dc:date>
    </item>
  </channel>
</rss>

