<?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: Formula with variable in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Formula-with-variable/m-p/1817346#M66941</link>
    <description>&lt;P&gt;Try these&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Sum({&amp;lt;[Daily Index] = {"&amp;gt;0&amp;lt;=$(=vLastUpdateDailyIndex)"}&amp;gt;} Value_OK)&lt;/LI-CODE&gt;&lt;P&gt;or this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Sum({&amp;lt;[Daily Index] = {"&amp;gt;0&amp;lt;=$(=$(vLastUpdateDailyIndex))"}&amp;gt;} Value_OK)&lt;/LI-CODE&gt;</description>
    <pubDate>Wed, 23 Jun 2021 12:59:12 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2021-06-23T12:59:12Z</dc:date>
    <item>
      <title>Formula with variable</title>
      <link>https://community.qlik.com/t5/App-Development/Formula-with-variable/m-p/1817336#M66938</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I´m trying to change a value in a formula by a variable, to make this flexible, but the moment I include the variable in the formula this doesn´t work anymore.&lt;/P&gt;&lt;P&gt;This is the initial formula I´m using:&lt;/P&gt;&lt;P&gt;sum({&amp;lt;[Daily Index]={"&amp;gt;0 &amp;nbsp;&amp;lt;=&lt;STRONG&gt;615&lt;/STRONG&gt;"}&amp;gt;}Value_OK)&lt;/P&gt;&lt;P&gt;However, when I use a variable instead of 615 (to make it dynamic) the formula gives a wrong number:&lt;/P&gt;&lt;P&gt;sum({&amp;lt;[Daily Index]={"&amp;gt;0 &amp;lt;=$(&lt;STRONG&gt;vLastUpdateDailyIndex&lt;/STRONG&gt;)"}&amp;gt;}Value_OK)&lt;/P&gt;&lt;P&gt;Please note that in the variable ‘LastUpdateDailyIndex’ we are trying to dynamically calculate an index as (Month*100 + DayNumber) to calculate across different years.&lt;/P&gt;&lt;P&gt;Example: 15th June, Index=615 (6*100 + 15)&lt;/P&gt;&lt;P&gt;The variables used seem to be working fine, these are the formulas:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;vLastUpdateDailyIndex &lt;/STRONG&gt;=&amp;nbsp;month($(vLastUpdate))*100) + Day($(vLastUpdate)&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;vLastUpdate&lt;/STRONG&gt; = max(if(Version='Actual_2021',[Posting Date],0))&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Only the formula mentioned above is not working:&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;sum({&amp;lt;[Daily Index]={"&amp;gt;0 &amp;lt;=$(vLastUpdateDailyIndex)"}&amp;gt;}Value_OK)&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;Is there something wrong in the syntax?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Thanks&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 23 Jun 2021 12:51:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Formula-with-variable/m-p/1817336#M66938</guid>
      <dc:creator>analovera91</dc:creator>
      <dc:date>2021-06-23T12:51:38Z</dc:date>
    </item>
    <item>
      <title>Re: Formula with variable</title>
      <link>https://community.qlik.com/t5/App-Development/Formula-with-variable/m-p/1817346#M66941</link>
      <description>&lt;P&gt;Try these&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Sum({&amp;lt;[Daily Index] = {"&amp;gt;0&amp;lt;=$(=vLastUpdateDailyIndex)"}&amp;gt;} Value_OK)&lt;/LI-CODE&gt;&lt;P&gt;or this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Sum({&amp;lt;[Daily Index] = {"&amp;gt;0&amp;lt;=$(=$(vLastUpdateDailyIndex))"}&amp;gt;} Value_OK)&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 23 Jun 2021 12:59:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Formula-with-variable/m-p/1817346#M66941</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2021-06-23T12:59:12Z</dc:date>
    </item>
    <item>
      <title>Re: Formula with variable</title>
      <link>https://community.qlik.com/t5/App-Development/Formula-with-variable/m-p/1817540#M66971</link>
      <description>&lt;P&gt;Thanks a lot! The formula is working:&lt;/P&gt;&lt;DIV&gt;Sum({&amp;lt;[Daily Index] = {"&amp;gt;0&amp;lt;=$(=$(vLastUpdateDailyIndex))"}&amp;gt;} Value_OK)&lt;/DIV&gt;</description>
      <pubDate>Thu, 24 Jun 2021 08:00:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Formula-with-variable/m-p/1817540#M66971</guid>
      <dc:creator>analovera91</dc:creator>
      <dc:date>2021-06-24T08:00:15Z</dc:date>
    </item>
  </channel>
</rss>

