<?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: Nested Variables not working - sum of variables only evaluating first variable in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Nested-Variables-not-working-sum-of-variables-only-evaluating/m-p/1690725#M52772</link>
    <description>&lt;P&gt;Would you be able to share a sample where we can see this behavior? On another note, do you need dollar sign expansion? Can you try this?&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;RangeSum(vVar1, vVar2)&lt;/LI-CODE&gt;</description>
    <pubDate>Fri, 03 Apr 2020 11:22:44 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2020-04-03T11:22:44Z</dc:date>
    <item>
      <title>Nested Variables not working - sum of variables only evaluating first variable</title>
      <link>https://community.qlik.com/t5/App-Development/Nested-Variables-not-working-sum-of-variables-only-evaluating/m-p/1690394#M52748</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Im developing a QS app in QS Enterprise server. I have multiple variables that are frequently summed. When I use the syntax I am used to it only sums the first part.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Example:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Variables:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;vVar1 = 3&lt;/P&gt;&lt;P&gt;vVar2 = 5&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Result I am getting (last should obviously be 8):&lt;/STRONG&gt;&lt;/P&gt;&lt;TABLE border="1" width="100.00000000000001%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="16.666666666666668%" height="25px"&gt;EXPRESSION used&lt;/TD&gt;&lt;TD width="16.666666666666668%" height="25px"&gt;=$(vVar1)&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="25px"&gt;=$(vVar2)&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="25px"&gt;=$(vVar1)+$(vVar2)&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="16.666666666666668%" height="25px"&gt;RESULT&lt;/TD&gt;&lt;TD width="16.666666666666668%" height="25px"&gt;3&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="25px"&gt;5&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="25px"&gt;3&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I flip the variables around ($(vVar2)+$(vVar1)) I get 5 as a result.&lt;/P&gt;&lt;P&gt;I tried different syntaxes, all return an error or nothing.&lt;/P&gt;&lt;P&gt;What I tried:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;adding or removing $ in variables or expression&lt;/LI&gt;&lt;LI&gt;adding or removing =&amp;nbsp;in variables or expression&lt;/LI&gt;&lt;LI&gt;moving around the brackets&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Everything return an error or a " - " cell, except the above method which only sums the first one.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any idea's?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 02 Apr 2020 15:50:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Nested-Variables-not-working-sum-of-variables-only-evaluating/m-p/1690394#M52748</guid>
      <dc:creator>DawidDaw</dc:creator>
      <dc:date>2020-04-02T15:50:40Z</dc:date>
    </item>
    <item>
      <title>Re: Nested Variables not working - sum of variables only evaluating first variable</title>
      <link>https://community.qlik.com/t5/App-Development/Nested-Variables-not-working-sum-of-variables-only-evaluating/m-p/1690439#M52751</link>
      <description>&lt;P&gt;What happens when you use RangeSum()?&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;RangeSum($(vVar1), $(vVar2))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Apr 2020 17:10:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Nested-Variables-not-working-sum-of-variables-only-evaluating/m-p/1690439#M52751</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2020-04-02T17:10:18Z</dc:date>
    </item>
    <item>
      <title>Re: Nested Variables not working - sum of variables only evaluating first variable</title>
      <link>https://community.qlik.com/t5/App-Development/Nested-Variables-not-working-sum-of-variables-only-evaluating/m-p/1690666#M52766</link>
      <description>&lt;P&gt;Hi Sunny,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It returns an empty value (-) &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Dawid&lt;/P&gt;</description>
      <pubDate>Fri, 03 Apr 2020 09:23:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Nested-Variables-not-working-sum-of-variables-only-evaluating/m-p/1690666#M52766</guid>
      <dc:creator>DawidDaw</dc:creator>
      <dc:date>2020-04-03T09:23:00Z</dc:date>
    </item>
    <item>
      <title>Re: Nested Variables not working - sum of variables only evaluating first variable</title>
      <link>https://community.qlik.com/t5/App-Development/Nested-Variables-not-working-sum-of-variables-only-evaluating/m-p/1690725#M52772</link>
      <description>&lt;P&gt;Would you be able to share a sample where we can see this behavior? On another note, do you need dollar sign expansion? Can you try this?&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;RangeSum(vVar1, vVar2)&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 03 Apr 2020 11:22:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Nested-Variables-not-working-sum-of-variables-only-evaluating/m-p/1690725#M52772</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2020-04-03T11:22:44Z</dc:date>
    </item>
    <item>
      <title>Re: Nested Variables not working - sum of variables only evaluating first variable</title>
      <link>https://community.qlik.com/t5/App-Development/Nested-Variables-not-working-sum-of-variables-only-evaluating/m-p/1690736#M52774</link>
      <description>&lt;P&gt;As I'm fully on server with database data, I would need to re-create everything from scratch. I'll see if I can work something out.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Unfortunately, using the rangesum without the expansion doesn't work either.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Maybe I should mention de variables are set analysis:&lt;/P&gt;&lt;P&gt;sum({$&amp;lt;financials_state={"Actual"}, costType={"DirectCost"}&amp;gt;} financials_amount_euro_tax_excl )&lt;/P&gt;&lt;P&gt;sum({$&amp;lt;financials_state={"Actual"}, costType={"IndirectCost"}&amp;gt;} financials_amount_euro_tax_excl )&lt;/P&gt;</description>
      <pubDate>Fri, 03 Apr 2020 11:52:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Nested-Variables-not-working-sum-of-variables-only-evaluating/m-p/1690736#M52774</guid>
      <dc:creator>DawidDaw</dc:creator>
      <dc:date>2020-04-03T11:52:17Z</dc:date>
    </item>
    <item>
      <title>Re: Nested Variables not working - sum of variables only evaluating first variable</title>
      <link>https://community.qlik.com/t5/App-Development/Nested-Variables-not-working-sum-of-variables-only-evaluating/m-p/1690738#M52775</link>
      <description>&lt;P&gt;I am just trying to throw out different ideas for you to try... does this work? basically adding extra parenthesis around each variable.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;($(vVar1)) + ($(vVar2))&lt;/LI-CODE&gt;&lt;P&gt;or&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;RangeSum(
  ($(vVar1)), ($(vVar2))
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Apr 2020 11:57:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Nested-Variables-not-working-sum-of-variables-only-evaluating/m-p/1690738#M52775</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2020-04-03T11:57:57Z</dc:date>
    </item>
    <item>
      <title>Re: Nested Variables not working - sum of variables only evaluating first variable</title>
      <link>https://community.qlik.com/t5/App-Development/Nested-Variables-not-working-sum-of-variables-only-evaluating/m-p/1690740#M52777</link>
      <description>&lt;P&gt;Jup, thanks for the troubleshoot Sunny! Neither the first nor the second, both return " - ".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However I notice you don't use = sign when inserting variable. I always have " =$(vVar) in all cases and have NO equal sign in variable definition. This is the way it works for me (well, until now).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can this be an indication?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Apr 2020 12:04:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Nested-Variables-not-working-sum-of-variables-only-evaluating/m-p/1690740#M52777</guid>
      <dc:creator>DawidDaw</dc:creator>
      <dc:date>2020-04-03T12:04:56Z</dc:date>
    </item>
    <item>
      <title>Re: Nested Variables not working - sum of variables only evaluating first variable</title>
      <link>https://community.qlik.com/t5/App-Development/Nested-Variables-not-working-sum-of-variables-only-evaluating/m-p/1690745#M52779</link>
      <description>&lt;P&gt;Ya, you can try adding an equal sign and see if that works&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;=($(vVar1)) + ($(vVar2))&lt;/LI-CODE&gt;&lt;P&gt;or&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;=RangeSum(
  ($(vVar1)), ($(vVar2))
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Apr 2020 12:14:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Nested-Variables-not-working-sum-of-variables-only-evaluating/m-p/1690745#M52779</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2020-04-03T12:14:49Z</dc:date>
    </item>
    <item>
      <title>Re: Nested Variables not working - sum of variables only evaluating first variable</title>
      <link>https://community.qlik.com/t5/App-Development/Nested-Variables-not-working-sum-of-variables-only-evaluating/m-p/1690746#M52780</link>
      <description>&lt;P&gt;What I mean is, I always use the equal sign. Don't really know the difference but that's the way I've always done it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Removing or adding the equal sign doesn't help &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Apr 2020 12:16:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Nested-Variables-not-working-sum-of-variables-only-evaluating/m-p/1690746#M52780</guid>
      <dc:creator>DawidDaw</dc:creator>
      <dc:date>2020-04-03T12:16:14Z</dc:date>
    </item>
    <item>
      <title>Re: Nested Variables not working - sum of variables only evaluating first variable</title>
      <link>https://community.qlik.com/t5/App-Development/Nested-Variables-not-working-sum-of-variables-only-evaluating/m-p/1690748#M52781</link>
      <description>&lt;P&gt;Can you post screenshots to show the issue? It is difficult to know what you might have without seeing it&lt;/P&gt;</description>
      <pubDate>Fri, 03 Apr 2020 12:20:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Nested-Variables-not-working-sum-of-variables-only-evaluating/m-p/1690748#M52781</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2020-04-03T12:20:03Z</dc:date>
    </item>
    <item>
      <title>Re: Nested Variables not working - sum of variables only evaluating first variable</title>
      <link>https://community.qlik.com/t5/App-Development/Nested-Variables-not-working-sum-of-variables-only-evaluating/m-p/1694049#M53086</link>
      <description>&lt;P&gt;Hi sunny,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sorry for not getting back to you, I've been of work.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Our DB architects released a new version of the dataset. I cannot reproduce the issue with the new variables, the sums work fine.&lt;/P&gt;&lt;P&gt;I still have a non refreshed version of the original dataset, I'll investigate if I have some time. will post if I do.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks anyway for your help!&lt;/P&gt;</description>
      <pubDate>Thu, 16 Apr 2020 12:27:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Nested-Variables-not-working-sum-of-variables-only-evaluating/m-p/1694049#M53086</guid>
      <dc:creator>DawidDaw</dc:creator>
      <dc:date>2020-04-16T12:27:48Z</dc:date>
    </item>
  </channel>
</rss>

