<?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 Expression Question in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-Expression-Question/m-p/519922#M194297</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;"&gt;This part isn't valid: &amp;lt;{$(AsofDate) - num(Due Date) &amp;gt;= 1 and $(AsofDate) &amp;lt;= 10}&amp;gt; . A set modifier needs a field name on the left side of the comparison not an expression. If Due Date is a field you could try &amp;lt;[Due Date] = {'=&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;$(AsofDate) - num([Due Date]) &amp;gt;= 1 and $(AsofDate) &amp;lt;= 10&lt;/SPAN&gt;'}&amp;gt;. Somehow I doubt it'll do what you want. &lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;You should probably try an if statement instead. &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 22 Aug 2013 14:43:38 GMT</pubDate>
    <dc:creator>Gysbert_Wassenaar</dc:creator>
    <dc:date>2013-08-22T14:43:38Z</dc:date>
    <item>
      <title>Set Expression Question</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Expression-Question/m-p/519921#M194296</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have the following expression and it doesn't appear to be working can anyone help me with the correct syntax????&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum({$&amp;lt;[Invoice Date] &amp;lt;= {$(AsofDate)}&amp;gt; + &amp;lt;{$(AsofDate) - num(Due Date) &amp;gt;= 1 and $(AsofDate) &amp;lt;= 10}&amp;gt;} [Balance in Home Currency])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am basically trying to put together two if conditions in set expression&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if invoice date &amp;lt;= AsOfDate (which is a variable in MM/DD/YYYY format)&lt;/P&gt;&lt;P&gt;and if the AsOfDate - Due Date &amp;gt;= 1 and AsOfDate - Due Date &amp;lt;= 10&lt;/P&gt;&lt;P&gt;then sum(balance in home currency)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do I have to do any formatting for AsOfDate????&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Aug 2013 14:33:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Expression-Question/m-p/519921#M194296</guid>
      <dc:creator />
      <dc:date>2013-08-22T14:33:28Z</dc:date>
    </item>
    <item>
      <title>Re: Set Expression Question</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Expression-Question/m-p/519922#M194297</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;"&gt;This part isn't valid: &amp;lt;{$(AsofDate) - num(Due Date) &amp;gt;= 1 and $(AsofDate) &amp;lt;= 10}&amp;gt; . A set modifier needs a field name on the left side of the comparison not an expression. If Due Date is a field you could try &amp;lt;[Due Date] = {'=&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;$(AsofDate) - num([Due Date]) &amp;gt;= 1 and $(AsofDate) &amp;lt;= 10&lt;/SPAN&gt;'}&amp;gt;. Somehow I doubt it'll do what you want. &lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;You should probably try an if statement instead. &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Aug 2013 14:43:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Expression-Question/m-p/519922#M194297</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2013-08-22T14:43:38Z</dc:date>
    </item>
    <item>
      <title>Re: Set Expression Question</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Expression-Question/m-p/519923#M194298</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have tried this if condition but can't get it to work right:&lt;/P&gt;&lt;P&gt;Sum(if([Invoice Date] &amp;lt;= date(AsOfDate,'MM/DD/YYYY') &lt;STRONG&gt;and (num(AsOfDate) - num([Due Date]) &amp;gt;= 1 and num(AsofDate) - num([Due Date]) &amp;lt;= 10)&lt;/STRONG&gt;, [Balance in Home Currency]))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I managed to get this to work but when I add the additional 'and' statement I don't get anything:&lt;/P&gt;&lt;P&gt;Sum(if([Invoice Date] &amp;lt;= date(AsOfDate, 'MM/DD/YYYY'),[Balance in Home Currency]))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Aug 2013 14:55:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Expression-Question/m-p/519923#M194298</guid>
      <dc:creator />
      <dc:date>2013-08-22T14:55:23Z</dc:date>
    </item>
    <item>
      <title>Re: Set Expression Question</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Expression-Question/m-p/519924#M194299</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What about the following?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Sum(&lt;/EM&gt;&lt;EM&gt;if(&lt;/EM&gt;&lt;EM&gt;[Invoice Date] &amp;lt;= date(AsOfDate,'MM/DD/YYYY') &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; and (num(date(AsOfDate,'MM/DD/YYYY')) - num([Due Date]) &amp;gt;= 1 &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; and num(date(AsOfDate,'MM/DD/YYYY')) - num([Due Date]) &amp;lt;= 10), [Balance in Home Currency]))&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Aug 2013 15:07:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Expression-Question/m-p/519924#M194299</guid>
      <dc:creator>Brice-SACCUCCI</dc:creator>
      <dc:date>2013-08-22T15:07:48Z</dc:date>
    </item>
    <item>
      <title>Re: Set Expression Question</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Expression-Question/m-p/519925#M194300</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It looks like this works!!!!&lt;/P&gt;&lt;P&gt;Thank you so much!!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Aug 2013 15:34:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Expression-Question/m-p/519925#M194300</guid>
      <dc:creator />
      <dc:date>2013-08-22T15:34:09Z</dc:date>
    </item>
    <item>
      <title>Re: Set Expression Question</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Expression-Question/m-p/519926#M194301</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Nice! Can you mark the question as solved?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Brice&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Aug 2013 08:07:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Expression-Question/m-p/519926#M194301</guid>
      <dc:creator>Brice-SACCUCCI</dc:creator>
      <dc:date>2013-08-23T08:07:30Z</dc:date>
    </item>
  </channel>
</rss>

