<?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: Qlik's issue with basic calculations in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Qlik-s-issue-with-basic-calculations/m-p/1422458#M33799</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I disagree that this is wrong.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When you do a dollar sign expansion you are substituting text exactly as it is written. So if I have&lt;/P&gt;&lt;P&gt;a = 2+3&lt;/P&gt;&lt;P&gt;b = 2 * $(a)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I SHOULD get 2 * 2 + 3 according to the rules of dollar sign expansion. This may not be what I intended (I might want 10 as my answer, and this will give me 7), but it is the consistent way that dollar sign expansions work. If you want 2+3 to be treated as a group, then use parentheses (2+3).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 02 Nov 2017 12:56:28 GMT</pubDate>
    <dc:creator>jonvitale</dc:creator>
    <dc:date>2017-11-02T12:56:28Z</dc:date>
    <item>
      <title>Qlik's issue with basic calculations</title>
      <link>https://community.qlik.com/t5/App-Development/Qlik-s-issue-with-basic-calculations/m-p/1422451#M33792</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I use the September 2017 version.&lt;/P&gt;&lt;P&gt;I found an&amp;nbsp; (funny?)&amp;nbsp; issue with basic calculations in Qlik Sense.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let's assume:&lt;/P&gt;&lt;P&gt;a=1&lt;/P&gt;&lt;P&gt;b=1+3&lt;/P&gt;&lt;P&gt;result = $(a)/$(b)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now it's time for the question - result is equal.....&lt;/P&gt;&lt;P&gt;Should be 0,25, right? (1 divided by 4)&lt;/P&gt;&lt;P&gt;Not for QlikSense! For QlikSense the results equals 4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I started investigation how it's possible.&lt;/P&gt;&lt;P&gt;It seems that Qlik instead of this:&lt;/P&gt;&lt;P&gt;a) calculate a variable&lt;/P&gt;&lt;P&gt;b) calculate b variable&lt;/P&gt;&lt;P&gt;c) divide: a/b&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does this:&lt;/P&gt;&lt;P&gt;a) do not calculate a and b&lt;/P&gt;&lt;P&gt;b) copy raw formulas (from variables) to the result: result = 1 / 1 +3&lt;/P&gt;&lt;P&gt;c) calculate it right now..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So the result is 1/1 +3 = 1+3=4&lt;/P&gt;&lt;P&gt;Instead of 1/4...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is this a known issue?&lt;/P&gt;&lt;P&gt;Are you (Qlik team) going to solve this problem? Maybe in the November 2017 version?&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/180728_Capture.PNG" style="height: auto;" /&gt; &lt;IMG alt="Capture2.PNG" class="jive-image image-2" src="https://community.qlik.com/legacyfs/online/180729_Capture2.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Oct 2017 12:02:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Qlik-s-issue-with-basic-calculations/m-p/1422451#M33792</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-10-24T12:02:49Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik's issue with basic calculations</title>
      <link>https://community.qlik.com/t5/App-Development/Qlik-s-issue-with-basic-calculations/m-p/1422452#M33793</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is as intended, should you want the outcome to be 0.25 then use $(=a)/$(=b)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-blogpost/3996"&gt;The Little Equals Sign&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Oct 2017 12:32:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Qlik-s-issue-with-basic-calculations/m-p/1422452#M33793</guid>
      <dc:creator>stigchel</dc:creator>
      <dc:date>2017-10-24T12:32:39Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik's issue with basic calculations</title>
      <link>https://community.qlik.com/t5/App-Development/Qlik-s-issue-with-basic-calculations/m-p/1422453#M33794</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Order of Operations:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #404040; font-family: Arial, Helvetica, sans-serif; font-size: 14px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #404040; font-family: Arial, Helvetica, sans-serif; font-size: 14px;"&gt;&lt;STRONG&gt;&lt;EM&gt;"&lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #404040; font-family: Arial, Helvetica, sans-serif; font-size: 14px;"&gt;&lt;STRONG&gt;&lt;EM&gt;Parentheses, Exponents, Multiplication and Division, and Addition and Subtraction"&lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #404040; font-family: Arial, Helvetica, sans-serif; font-size: 14px;"&gt;&lt;STRONG&gt;&lt;EM&gt;The Expression should be like = $(a)/($(b))&lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #404040; font-family: Arial, Helvetica, sans-serif; font-size: 14px;"&gt;&lt;STRONG&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #404040; font-family: Arial, Helvetica, sans-serif; font-size: 14px;"&gt;&lt;STRONG&gt;&lt;EM&gt;because you saved a and b values are in a string.&lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #404040; font-family: Arial, Helvetica, sans-serif; font-size: 14px;"&gt;&lt;STRONG&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #404040; font-family: Arial, Helvetica, sans-serif; font-size: 14px;"&gt;&lt;STRONG&gt;&lt;EM&gt;a 1&lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #404040; font-family: Arial, Helvetica, sans-serif; font-size: 14px;"&gt;&lt;STRONG&gt;&lt;EM&gt;b 1+3&lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #404040; font-family: Arial, Helvetica, sans-serif; font-size: 14px;"&gt;&lt;STRONG&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #404040; font-family: Arial, Helvetica, sans-serif; font-size: 14px;"&gt;&lt;STRONG&gt;&lt;EM&gt;the calculation will be &lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #404040; font-family: Arial, Helvetica, sans-serif; font-size: 14px;"&gt;&lt;STRONG&gt;&lt;EM&gt;=1/1+3&lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #404040; font-family: Arial, Helvetica, sans-serif; font-size: 14px;"&gt;&lt;STRONG&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #404040; font-family: Arial, Helvetica, sans-serif; font-size: 14px;"&gt;&lt;STRONG&gt;&lt;EM&gt;first, it will divide 1/1 then it will do addition 3.&lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;While creating variable b you can use &lt;SPAN style="font-size: 12pt;"&gt;=&lt;/SPAN&gt; symbol it will calculate the value ( =1+3 ) (4)&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #404040; font-family: Arial, Helvetica, sans-serif; font-size: 14px;"&gt;&lt;STRONG&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #404040; font-family: Arial, Helvetica, sans-serif; font-size: 14px;"&gt;&lt;STRONG&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #404040; font-family: Arial, Helvetica, sans-serif; font-size: 14px;"&gt;&lt;STRONG&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Oct 2017 12:38:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Qlik-s-issue-with-basic-calculations/m-p/1422453#M33794</guid>
      <dc:creator>mdmukramali</dc:creator>
      <dc:date>2017-10-24T12:38:02Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik's issue with basic calculations</title>
      <link>https://community.qlik.com/t5/App-Development/Qlik-s-issue-with-basic-calculations/m-p/1422454#M33795</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Nope.&lt;/P&gt;&lt;P&gt;It's still 4.&lt;/P&gt;&lt;P&gt;The Little Equals Sign doesn't work here.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture3.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/180743_Capture3.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Oct 2017 13:20:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Qlik-s-issue-with-basic-calculations/m-p/1422454#M33795</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-10-24T13:20:10Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik's issue with basic calculations</title>
      <link>https://community.qlik.com/t5/App-Development/Qlik-s-issue-with-basic-calculations/m-p/1422455#M33796</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1. It's not about the order of operations.&lt;/P&gt;&lt;P&gt;It's about the process of calculation in Qlik Sense.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. If you have&lt;/P&gt;&lt;P&gt;x=2+3&lt;/P&gt;&lt;P&gt;and you have to multiply 2*x&lt;/P&gt;&lt;P&gt;what will you do?&lt;/P&gt;&lt;P&gt;2*(2+3) or 2*2+3&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Of course the first answer is correct.&lt;/P&gt;&lt;P&gt;That's the logic of using variables/unknowns&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem is that Qlik is using the second (wrong) way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3.Using the equals sign in the definition of b variable is not a good choice.&lt;/P&gt;&lt;P&gt;Maybe in this example it doesn't change too much.&lt;/P&gt;&lt;P&gt;But - if the definition of "b" variable is more complex, the equals sign may have impact on the results of the "b" value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4.&amp;nbsp; Of course, I can put everything into brackets, but I am not looking for "workaround".&lt;/P&gt;&lt;P&gt;This should works correctly as in other softwares, scripting/programming languages etc.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Oct 2017 14:13:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Qlik-s-issue-with-basic-calculations/m-p/1422455#M33796</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-10-24T14:13:14Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik's issue with basic calculations</title>
      <link>https://community.qlik.com/t5/App-Development/Qlik-s-issue-with-basic-calculations/m-p/1422456#M33797</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My bad&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Either change the variable definition to include the = sign&lt;/P&gt;&lt;P&gt;=1+3&lt;/P&gt;&lt;P&gt;instead of&lt;/P&gt;&lt;P&gt;1+3&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or use&lt;/P&gt;&lt;P&gt;$(=$(b))&lt;/P&gt;&lt;P&gt;In your expression&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Oct 2017 14:38:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Qlik-s-issue-with-basic-calculations/m-p/1422456#M33797</guid>
      <dc:creator>stigchel</dc:creator>
      <dc:date>2017-10-24T14:38:11Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik's issue with basic calculations</title>
      <link>https://community.qlik.com/t5/App-Development/Qlik-s-issue-with-basic-calculations/m-p/1422457#M33798</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks - Finally, &lt;STRONG&gt;$(=$(b))&lt;/STRONG&gt; is working&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, instead of 3 characters &lt;STRONG&gt;a/b&lt;/STRONG&gt;, I have to use 17 characters: &lt;STRONG&gt;$(=$(a))/$(=$(b))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Good that the syntax is so clear &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/grin.png" /&gt; We need to add ONLY &lt;STRONG&gt;8&lt;/STRONG&gt; x &lt;STRONG&gt;brackets&lt;/STRONG&gt;, &lt;STRONG&gt;4&lt;/STRONG&gt; x &lt;STRONG&gt;dollar signs&lt;/STRONG&gt; and&lt;STRONG&gt; 2&lt;/STRONG&gt; x &lt;STRONG&gt;equals signs&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Nice improvement Qlik &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/grin.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is an example of incosistency.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;$(a)&lt;/STRONG&gt; returns &lt;STRONG&gt;1&lt;/STRONG&gt;, &lt;STRONG&gt;$(b)&lt;/STRONG&gt; returns&lt;STRONG&gt; 4&lt;/STRONG&gt;, &lt;STRONG&gt;$(a)/$(b)&lt;/STRONG&gt; is &lt;STRONG&gt;wrong&lt;/STRONG&gt; and returns&lt;STRONG&gt; 4&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So you have to use &lt;STRONG&gt;$(=$(b))&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;But &lt;STRONG&gt;$(=$(b))&lt;/STRONG&gt; doesn't work while you have definition with any field like &lt;STRONG&gt;b=[Field]+3&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;no comments&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To be honest - this is the simplest example of using two variables.&lt;/P&gt;&lt;P&gt;If I have to use 17 characters to divide two variables (with 8 brackets!) what would happen if have to use 5 variables?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please take a look at this simple calculation:&lt;/P&gt;&lt;P&gt;$(=$(a))/$(=$(b))*($(=$(b1))*$(=$(b2))-$(=$(c)))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Fortunately, Qlik helps us with syntax highlighting&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="180834" alt="Capture4.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/180834_Capture4.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Nope!&lt;/P&gt;&lt;P&gt;it doesn't help &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt; of course, there is still no good syntax highlighting&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If this is intended... God help us&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Oct 2017 07:51:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Qlik-s-issue-with-basic-calculations/m-p/1422457#M33798</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-10-25T07:51:04Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik's issue with basic calculations</title>
      <link>https://community.qlik.com/t5/App-Development/Qlik-s-issue-with-basic-calculations/m-p/1422458#M33799</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I disagree that this is wrong.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When you do a dollar sign expansion you are substituting text exactly as it is written. So if I have&lt;/P&gt;&lt;P&gt;a = 2+3&lt;/P&gt;&lt;P&gt;b = 2 * $(a)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I SHOULD get 2 * 2 + 3 according to the rules of dollar sign expansion. This may not be what I intended (I might want 10 as my answer, and this will give me 7), but it is the consistent way that dollar sign expansions work. If you want 2+3 to be treated as a group, then use parentheses (2+3).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Nov 2017 12:56:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Qlik-s-issue-with-basic-calculations/m-p/1422458#M33799</guid>
      <dc:creator>jonvitale</dc:creator>
      <dc:date>2017-11-02T12:56:28Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik's issue with basic calculations</title>
      <link>https://community.qlik.com/t5/App-Development/Qlik-s-issue-with-basic-calculations/m-p/1422459#M33800</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think it is correct. &lt;/P&gt;&lt;P&gt;1/1 + 3 = 1 + 3 = 4&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Nov 2017 16:03:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Qlik-s-issue-with-basic-calculations/m-p/1422459#M33800</guid>
      <dc:creator>Nacho</dc:creator>
      <dc:date>2017-11-02T16:03:08Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik's issue with basic calculations</title>
      <link>https://community.qlik.com/t5/App-Development/Qlik-s-issue-with-basic-calculations/m-p/1422460#M33801</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I understand the operation of $() expansion.&lt;/P&gt;&lt;P&gt;I said it wrong beacause &lt;STRONG&gt;it's illogical and unintuitive&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you define:&lt;/P&gt;&lt;P&gt;a=1&lt;/P&gt;&lt;P&gt;b=1+3&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The results of a/b will be:&lt;/P&gt;&lt;P&gt;in C# 0,25&lt;/P&gt;&lt;P&gt;in VBA 0,25&lt;/P&gt;&lt;P&gt;in JS 0,25&lt;/P&gt;&lt;P&gt;in Maths 0,25&lt;/P&gt;&lt;P&gt;and so on..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in Qlik it's 4, cause it doesn't calculate varaibles before using.&lt;/P&gt;&lt;P&gt;The way of using variables in Qlik is opposite to standards and logic.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And finnally it's &lt;STRONG&gt;ridiculous&lt;/STRONG&gt; because to write correctly this simple expression:&lt;/P&gt;&lt;P&gt;a/(b+c/d)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you have to use 37 characters&lt;/P&gt;&lt;P&gt;$(=$(a))/($(=$(b))+$(=$(c))/$(=$(d)))&lt;/P&gt;&lt;P&gt;and the expression is unreadable&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Nov 2017 10:18:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Qlik-s-issue-with-basic-calculations/m-p/1422460#M33801</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-11-03T10:18:59Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik's issue with basic calculations</title>
      <link>https://community.qlik.com/t5/App-Development/Qlik-s-issue-with-basic-calculations/m-p/1422461#M33802</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Look at "let" vs "set" in help.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="letset.jpg" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/182006_letset.jpg" style="height: 241px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Let: Calculates the expression assigned to it and sets the expression result to the variable.&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Set: Assigns the value(or expression which is after the equal sign) as it is without compute.&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;A href="https://help.qlik.com/en-US/sense/June2017/Subsystems/Hub/Content/Scripting/ScriptRegularStatements/Set.htm" title="https://help.qlik.com/en-US/sense/June2017/Subsystems/Hub/Content/Scripting/ScriptRegularStatements/Set.htm"&gt;https://help.qlik.com/en-US/sense/June2017/Subsystems/Hub/Content/Scripting/ScriptRegularStatements/Set.htm&lt;/A&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;A href="https://help.qlik.com/en-US/sense/June2017/Subsystems/Hub/Content/Scripting/ScriptRegularStatements/Let.htm" title="https://help.qlik.com/en-US/sense/June2017/Subsystems/Hub/Content/Scripting/ScriptRegularStatements/Let.htm"&gt;https://help.qlik.com/en-US/sense/June2017/Subsystems/Hub/Content/Scripting/ScriptRegularStatements/Let.htm&lt;/A&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Regards&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Lucke&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Nov 2017 11:58:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Qlik-s-issue-with-basic-calculations/m-p/1422461#M33802</guid>
      <dc:creator>Lucke_Hallbergson</dc:creator>
      <dc:date>2017-11-03T11:58:21Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik's issue with basic calculations</title>
      <link>https://community.qlik.com/t5/App-Development/Qlik-s-issue-with-basic-calculations/m-p/1422462#M33803</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It not related to "let" or "set" keyword. It's not about "data load variables".&lt;/P&gt;&lt;P&gt;Please read the post before answer.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Nov 2017 13:12:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Qlik-s-issue-with-basic-calculations/m-p/1422462#M33803</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-11-03T13:12:18Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik's issue with basic calculations</title>
      <link>https://community.qlik.com/t5/App-Development/Qlik-s-issue-with-basic-calculations/m-p/1422463#M33804</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I see what you're saying, I get it, but I I think that it does follow the logic of dollar sign expansion - which does not do any computation - it just replaces variables in a literal manner.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;By the way, one thing that has been overlooked in this discussion is "set" vs. "let":&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you do the following&lt;/P&gt;&lt;P&gt;let a = 1;&lt;/P&gt;&lt;P&gt;let b = 1+3; &lt;/P&gt;&lt;P&gt;let c = a/(a+b);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You will get the expected value for 'c', 0.20.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Nov 2017 13:19:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Qlik-s-issue-with-basic-calculations/m-p/1422463#M33804</guid>
      <dc:creator>jonvitale</dc:creator>
      <dc:date>2017-11-03T13:19:38Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik's issue with basic calculations</title>
      <link>https://community.qlik.com/t5/App-Development/Qlik-s-issue-with-basic-calculations/m-p/1422464#M33805</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I see, but it's not related to data load editor. So the "let" and "set" keywords don't resolve the problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It's a little tricky and unintuitive.&lt;/P&gt;&lt;P&gt;Who wants to use variables as replacements of text formulas?&lt;/P&gt;&lt;P&gt;If you use e.g.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;margin=0.1*Price-Discount&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;you want to keep results of the expression, not expression itself.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Who is interested in keeping text string "0.1 * Price - Discout" instead of exact number?&lt;/P&gt;&lt;P&gt;For me - more usefull (if we are talking about variables) is result, not the text of formula.&lt;/P&gt;&lt;P&gt;So the &lt;STRONG&gt;$(var)&lt;/STRONG&gt; should return value, and more complex syntax like &lt;STRONG&gt;$(=$(var))&lt;/STRONG&gt; should return "text formula".&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Nov 2017 13:55:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Qlik-s-issue-with-basic-calculations/m-p/1422464#M33805</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-11-03T13:55:09Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik's issue with basic calculations</title>
      <link>https://community.qlik.com/t5/App-Development/Qlik-s-issue-with-basic-calculations/m-p/1422465#M33806</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think you are mixing up a number of concepts and rules.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As a best practice, you should always enclose variables that contain operators in parens to avoid order of operation issues. So recommended would be:&lt;/P&gt;&lt;P&gt;a: 1&lt;/P&gt;&lt;P&gt;b: (1+3)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and then "$(a) / $(b)" would return the correct result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You made the assertion:&lt;/P&gt;&lt;P&gt;----------------------------&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;if you define:&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;a=1&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;b=1+3&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;The results of a/b will be:&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;in C# 0,25&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;in VBA 0,25&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;JS 0,25&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;-------------------------------&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;That would be true if a and b were created using numeric expressions as you show in the example. You can do the same thing in Qlik Sense load script;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;a = 1;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;b = 1+3;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Then the expression "a / b" would equal 0.25, as you are expecting.&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;However, when you enter variable values using the variable editor, the values are always &lt;EM&gt;strings&lt;/EM&gt;.&amp;nbsp; So if we return to the C#/JS example, the statements would be:&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;a="1";&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;b="1+3";&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;a/b would not return a correct result.&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;If you want to enter 1+3 in the variable editor, and you want it to be stored as the result of that expression, you can preceed the expression with an = sign, which will cause the result "4" to become the value of the variable. This is just as it is in your C#/JS example, you have to use an = if you want 1+3 to be treated as 4.&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;-Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Nov 2017 16:48:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Qlik-s-issue-with-basic-calculations/m-p/1422465#M33806</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2017-11-22T16:48:21Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik's issue with basic calculations</title>
      <link>https://community.qlik.com/t5/App-Development/Qlik-s-issue-with-basic-calculations/m-p/1422466#M33807</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Who wants to use variables as replacements of text formulas?&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;If you use e.g.&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;margin=0.1*Price-Discount&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;you want to keep results of the expression, not expression itself.&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Using variables is probably 90% of the use of variables in Qlik.&amp;nbsp; The reason we want the text, not the result, is that evaluation must be deferred to the chart row where it will be calculated using the data for that row.&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Using your example above, we want the Price and Discount for the current row when we make the calculation. &lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;-Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Nov 2017 16:55:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Qlik-s-issue-with-basic-calculations/m-p/1422466#M33807</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2017-11-22T16:55:13Z</dc:date>
    </item>
  </channel>
</rss>

