<?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: Variables not working together in expression. in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Variables-not-working-together-in-expression/m-p/118151#M8249</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;EDIT:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The vCurrentMonthLeadGoal is made up of a collection of sums:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum(Expression1)&lt;/P&gt;&lt;P&gt;+&lt;/P&gt;&lt;P&gt;Sum(Expression2)&lt;/P&gt;&lt;P&gt;+&lt;/P&gt;&lt;P&gt;Sum(Expression3)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I took the ceiling of this expression, and everything is working fine now:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ceil(&lt;/P&gt;&lt;P&gt;Sum(Expression1)&lt;/P&gt;&lt;P&gt;+&lt;/P&gt;&lt;P&gt;Sum(Expression2)&lt;/P&gt;&lt;P&gt;+&lt;/P&gt;&lt;P&gt;Sum(Expression3)&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That said, I'd still like to know why it behaves this way. If anyone could enlighten me, I would appreciate it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 07 Nov 2018 21:58:18 GMT</pubDate>
    <dc:creator>acbishop2</dc:creator>
    <dc:date>2018-11-07T21:58:18Z</dc:date>
    <item>
      <title>Variables not working together in expression.</title>
      <link>https://community.qlik.com/t5/App-Development/Variables-not-working-together-in-expression/m-p/118150#M8248</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've noticed before that when doing arithmetic with variables, I often need to put parentheses around them, but that's not working this time. Here's the deal:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have 3 Variables:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) vCurrentMonthLeadGoal - contains the lead goal for this month.&lt;/P&gt;&lt;P&gt;2) vCurrentMonthWorkDays - contains the number of workdays in this month.&lt;/P&gt;&lt;P&gt;3) vMTDWorkDays - contains the number of workdays from the beginning of this month to today.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Each of the above variables works on its own. However, when I try to combine the three to create a 4th variable, I run into a problem. My fourth variable is meant to calculate today's lead "target", which is essentially just where we should be today to meet this month's goal. The formula is as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;STRONG&gt;($(vCurrentMonthLeadGoal))&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;STRONG&gt;/&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;STRONG&gt;($(vCurrentMonthWorkDays))&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;STRONG&gt;*&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;STRONG&gt;($(vMTDWorkDays))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This just gives me a "-".&amp;nbsp; Any solution? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance for the help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Nov 2018 21:52:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Variables-not-working-together-in-expression/m-p/118150#M8248</guid>
      <dc:creator>acbishop2</dc:creator>
      <dc:date>2018-11-07T21:52:31Z</dc:date>
    </item>
    <item>
      <title>Re: Variables not working together in expression.</title>
      <link>https://community.qlik.com/t5/App-Development/Variables-not-working-together-in-expression/m-p/118151#M8249</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;EDIT:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The vCurrentMonthLeadGoal is made up of a collection of sums:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum(Expression1)&lt;/P&gt;&lt;P&gt;+&lt;/P&gt;&lt;P&gt;Sum(Expression2)&lt;/P&gt;&lt;P&gt;+&lt;/P&gt;&lt;P&gt;Sum(Expression3)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I took the ceiling of this expression, and everything is working fine now:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ceil(&lt;/P&gt;&lt;P&gt;Sum(Expression1)&lt;/P&gt;&lt;P&gt;+&lt;/P&gt;&lt;P&gt;Sum(Expression2)&lt;/P&gt;&lt;P&gt;+&lt;/P&gt;&lt;P&gt;Sum(Expression3)&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That said, I'd still like to know why it behaves this way. If anyone could enlighten me, I would appreciate it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Nov 2018 21:58:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Variables-not-working-together-in-expression/m-p/118151#M8249</guid>
      <dc:creator>acbishop2</dc:creator>
      <dc:date>2018-11-07T21:58:18Z</dc:date>
    </item>
    <item>
      <title>Re: Variables not working together in expression.</title>
      <link>https://community.qlik.com/t5/App-Development/Variables-not-working-together-in-expression/m-p/118152#M8250</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think the reason is your default number-formatting which probably used the comma as decimal delimiter. This means vCurrentMonthLeadGoal returned probably something like 100,50 which is fine if applied anywhere as a single-expression but is invalid as part of further calculations because it regards the comma than as a parameter delimiter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To solve this you could change the default formatting (in the script-variables in script-tab main but be careful - it might have side-effects to other interpretations/calculations in script and UI of your application) or you used a formatting like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;num(&lt;STRONG&gt;($(vCurrentMonthLeadGoal))&lt;/STRONG&gt;, '# ##0.##', '.', ' ')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Nov 2018 09:38:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Variables-not-working-together-in-expression/m-p/118152#M8250</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2018-11-08T09:38:22Z</dc:date>
    </item>
  </channel>
</rss>

