<?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 Sum expression by variable with calculation in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Sum-expression-by-variable-with-calculation/m-p/1974023#M80341</link>
    <description>&lt;P&gt;I am trying to create a Sum expression with a condition based on a variable minus n. &amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a variable &lt;EM&gt;vLatestMonth&lt;/EM&gt; which has the value of 7.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am trying to sum the [amount] column where the [month] column is equal to &lt;EM&gt;vLatestMonth&lt;/EM&gt;&amp;nbsp;minus one.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have tried the following code but received the following error message:&lt;/P&gt;
&lt;DIV class="lia-message-subject"&gt;&lt;LI-CODE lang="markup"&gt;SUM({&amp;lt;[month]={$(vLatestMonth)-1}&amp;gt;}[amount])

Error in set modifier ad hoc element list: ',' or ')' expected&lt;/LI-CODE&gt;&lt;/DIV&gt;
&lt;DIV class="lia-message-subject"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="MessageInResponseTo lia-component-message-view-widget-in-response-to lia-component-in-response-to"&gt;&amp;nbsp;&lt;/DIV&gt;</description>
    <pubDate>Mon, 29 Aug 2022 06:17:44 GMT</pubDate>
    <dc:creator>Denzyl</dc:creator>
    <dc:date>2022-08-29T06:17:44Z</dc:date>
    <item>
      <title>Sum expression by variable with calculation</title>
      <link>https://community.qlik.com/t5/App-Development/Sum-expression-by-variable-with-calculation/m-p/1974023#M80341</link>
      <description>&lt;P&gt;I am trying to create a Sum expression with a condition based on a variable minus n. &amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a variable &lt;EM&gt;vLatestMonth&lt;/EM&gt; which has the value of 7.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am trying to sum the [amount] column where the [month] column is equal to &lt;EM&gt;vLatestMonth&lt;/EM&gt;&amp;nbsp;minus one.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have tried the following code but received the following error message:&lt;/P&gt;
&lt;DIV class="lia-message-subject"&gt;&lt;LI-CODE lang="markup"&gt;SUM({&amp;lt;[month]={$(vLatestMonth)-1}&amp;gt;}[amount])

Error in set modifier ad hoc element list: ',' or ')' expected&lt;/LI-CODE&gt;&lt;/DIV&gt;
&lt;DIV class="lia-message-subject"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="MessageInResponseTo lia-component-message-view-widget-in-response-to lia-component-in-response-to"&gt;&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Mon, 29 Aug 2022 06:17:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Sum-expression-by-variable-with-calculation/m-p/1974023#M80341</guid>
      <dc:creator>Denzyl</dc:creator>
      <dc:date>2022-08-29T06:17:44Z</dc:date>
    </item>
    <item>
      <title>Re: Sum expression by variable with calculation</title>
      <link>https://community.qlik.com/t5/App-Development/Sum-expression-by-variable-with-calculation/m-p/1974037#M80344</link>
      <description>&lt;P&gt;I have found a solution:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;SUM({&amp;lt;[month]={$(=vLatestMonth-1)}&amp;gt;}[amount])&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Aug 2022 06:28:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Sum-expression-by-variable-with-calculation/m-p/1974037#M80344</guid>
      <dc:creator>Denzyl</dc:creator>
      <dc:date>2022-08-29T06:28:42Z</dc:date>
    </item>
  </channel>
</rss>

