<?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: Use a variable with decimals for arithmetic calculation in script in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Use-a-variable-with-decimals-for-arithmetic-calculation-in/m-p/2518525#M106111</link>
    <description>&lt;P&gt;Hi Oliver,&lt;/P&gt;&lt;P&gt;what about this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Table:
load
    $(vVar) * 10 as test
    ,'$(vVar)' * 10 as test2
AutoGenerate 10;&lt;/LI-CODE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="tw_wipro_1-1747851614005.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/180659iA84C016F8B112706/image-size/medium?v=v2&amp;amp;px=400" role="button" title="tw_wipro_1-1747851614005.png" alt="tw_wipro_1-1747851614005.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 21 May 2025 18:21:10 GMT</pubDate>
    <dc:creator>tw_wipro</dc:creator>
    <dc:date>2025-05-21T18:21:10Z</dc:date>
    <item>
      <title>Use a variable with decimals for arithmetic calculation in script</title>
      <link>https://community.qlik.com/t5/App-Development/Use-a-variable-with-decimals-for-arithmetic-calculation-in/m-p/2518519#M106110</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I feel a little stupid asking this question - anyway I need your help with this.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;SET ThousandSep='.';
SET DecimalSep=',';

let vVar = 8/7; //=1,1428571428571
trace vVar: $(vVar);

Table:
load
    $(vVar) * 10 as test
AutoGenerate 10;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What Qlik does here using dollar sign expansion is the following:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Table:
load
    1,1428571428571 * 10 as test
AutoGenerate 10;&lt;/LI-CODE&gt;&lt;P&gt;And this is interpretated as this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Table:
load
    1,
    1428571428571 * 10 as test
AutoGenerate 10;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So I end up getting a table with two fields. I tried to play around with different number formattings, but nothing works, because I do have to keep the accuracy of vVar.&lt;/P&gt;</description>
      <pubDate>Wed, 21 May 2025 17:55:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Use-a-variable-with-decimals-for-arithmetic-calculation-in/m-p/2518519#M106110</guid>
      <dc:creator>Oliver_GER</dc:creator>
      <dc:date>2025-05-21T17:55:32Z</dc:date>
    </item>
    <item>
      <title>Re: Use a variable with decimals for arithmetic calculation in script</title>
      <link>https://community.qlik.com/t5/App-Development/Use-a-variable-with-decimals-for-arithmetic-calculation-in/m-p/2518525#M106111</link>
      <description>&lt;P&gt;Hi Oliver,&lt;/P&gt;&lt;P&gt;what about this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Table:
load
    $(vVar) * 10 as test
    ,'$(vVar)' * 10 as test2
AutoGenerate 10;&lt;/LI-CODE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="tw_wipro_1-1747851614005.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/180659iA84C016F8B112706/image-size/medium?v=v2&amp;amp;px=400" role="button" title="tw_wipro_1-1747851614005.png" alt="tw_wipro_1-1747851614005.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 May 2025 18:21:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Use-a-variable-with-decimals-for-arithmetic-calculation-in/m-p/2518525#M106111</guid>
      <dc:creator>tw_wipro</dc:creator>
      <dc:date>2025-05-21T18:21:10Z</dc:date>
    </item>
    <item>
      <title>Re: Use a variable with decimals for arithmetic calculation in script</title>
      <link>https://community.qlik.com/t5/App-Development/Use-a-variable-with-decimals-for-arithmetic-calculation-in/m-p/2518528#M106112</link>
      <description>&lt;P&gt;THANK YOU! it was so easy. - I have to admit I do not fully understand, why qlik is still able to to calculate with it (it even works with timestamps) when we wrap it in single quotes, but it works. great!&lt;/P&gt;</description>
      <pubDate>Wed, 21 May 2025 18:33:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Use-a-variable-with-decimals-for-arithmetic-calculation-in/m-p/2518528#M106112</guid>
      <dc:creator>Oliver_GER</dc:creator>
      <dc:date>2025-05-21T18:33:12Z</dc:date>
    </item>
  </channel>
</rss>

