<?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 Operations with variables in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Operations-with-variables/m-p/228901#M502943</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello everyone&lt;/P&gt;&lt;P&gt;The problem is this: mathematical operations between variables do not work well !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This works well:&lt;/P&gt;&lt;P style="font-weight: bold"&gt;=$(v_Saldo) / $(v_Saldo_ap_1_mobile)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This does not return anything:&lt;/P&gt;&lt;P style="font-weight: bold"&gt;=($(v_Saldo) / $(v_Saldo_ap_1_mobile))-1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-style: italic; font-weight: bold"&gt;It is a "bug" in the program?&lt;/P&gt;&lt;P&gt;Thanks, Adriano&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 21 Jul 2010 09:52:16 GMT</pubDate>
    <dc:creator />
    <dc:date>2010-07-21T09:52:16Z</dc:date>
    <item>
      <title>Operations with variables</title>
      <link>https://community.qlik.com/t5/QlikView/Operations-with-variables/m-p/228901#M502943</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello everyone&lt;/P&gt;&lt;P&gt;The problem is this: mathematical operations between variables do not work well !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This works well:&lt;/P&gt;&lt;P style="font-weight: bold"&gt;=$(v_Saldo) / $(v_Saldo_ap_1_mobile)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This does not return anything:&lt;/P&gt;&lt;P style="font-weight: bold"&gt;=($(v_Saldo) / $(v_Saldo_ap_1_mobile))-1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-style: italic; font-weight: bold"&gt;It is a "bug" in the program?&lt;/P&gt;&lt;P&gt;Thanks, Adriano&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Jul 2010 09:52:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Operations-with-variables/m-p/228901#M502943</guid>
      <dc:creator />
      <dc:date>2010-07-21T09:52:16Z</dc:date>
    </item>
    <item>
      <title>Operations with variables</title>
      <link>https://community.qlik.com/t5/QlikView/Operations-with-variables/m-p/228902#M502944</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 test both expression and both work well for me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anders&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Jul 2010 10:01:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Operations-with-variables/m-p/228902#M502944</guid>
      <dc:creator />
      <dc:date>2010-07-21T10:01:58Z</dc:date>
    </item>
    <item>
      <title>Operations with variables</title>
      <link>https://community.qlik.com/t5/QlikView/Operations-with-variables/m-p/228903#M502945</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 also tested both, and both work for me, so I would assume it's something to do with your variable definitions.&lt;/P&gt;&lt;P&gt;Can you tell us how the variables are defined, what do they contain?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Jul 2010 10:03:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Operations-with-variables/m-p/228903#M502945</guid>
      <dc:creator />
      <dc:date>2010-07-21T10:03:48Z</dc:date>
    </item>
    <item>
      <title>Operations with variables</title>
      <link>https://community.qlik.com/t5/QlikView/Operations-with-variables/m-p/228904#M502946</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, and thanks for your reply !&lt;/P&gt;&lt;P&gt;The variables are complex. Here is their definition:&lt;/P&gt;&lt;P&gt;v_Saldo --&amp;gt; &lt;B&gt;If&lt;/B&gt;(&lt;B&gt;[Flag saldo iniziale]&lt;/B&gt;='SI',&lt;B&gt;Sum&lt;/B&gt;(&lt;B&gt;[Partitario - Importo Con Segno]&lt;/B&gt;),&lt;B&gt;Sum&lt;/B&gt;(&lt;B&gt;If&lt;/B&gt;(&lt;B&gt;[Partitario - Flag Saldo apertura]&lt;/B&gt;='NO',&lt;B&gt;[Partitario - Importo Con Segno]&lt;/B&gt;)))&lt;/P&gt;&lt;P&gt;v_Saldo_ap_1_mobile --&amp;gt;&lt;/P&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P style="font-weight: bold"&gt;If&lt;/P&gt;(&lt;B&gt;&lt;/B&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;([Flag saldo iniziale]='SI',Sum({$&amp;lt;[Partitario - Anno Data Operazione] = {$(#=Only([Partitario - Anno Data Operazione])-1)} &amp;gt;} [Partitario - Importo Con Segno]) &lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Adriano&lt;/P&gt;&lt;P&gt;The variables are complex&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Jul 2010 10:16:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Operations-with-variables/m-p/228904#M502946</guid>
      <dc:creator />
      <dc:date>2010-07-21T10:16:42Z</dc:date>
    </item>
    <item>
      <title>Operations with variables</title>
      <link>https://community.qlik.com/t5/QlikView/Operations-with-variables/m-p/228905#M502947</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;You might try changing the location of your SUM function in the variable definition to the outside of the formula, this might help, so your variables wiil look like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;=SUM(&lt;STRONG&gt;If&lt;/STRONG&gt;(&lt;B&gt;[Flag saldo iniziale]&lt;/B&gt;='SI',&lt;B&gt;[Partitario - Importo Con Segno]&lt;/B&gt;,&lt;B&gt;If&lt;/B&gt;(&lt;B&gt;[Partitario - Flag Saldo apertura]&lt;/B&gt;='NO',&lt;B&gt;[Partitario - Importo Con Segno]&lt;/B&gt;)))&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;and&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;=SUM(&lt;B&gt;If&lt;/B&gt;(&lt;B&gt;(&lt;/B&gt;[Flag saldo iniziale]='SI',{$&amp;lt;[Partitario - Anno Data Operazione] = {$(#=Only([Partitario - Anno Data Operazione])-1)} &amp;gt;} [Partitario - Importo Con Segno]) )&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Second, if this doesn't work then you could calculate the value of variable 1 in one column, then variable 2 in a second column and then create a third column which has a formula such as:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;=Column(1) - Column(2) - 1&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Jul 2010 10:25:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Operations-with-variables/m-p/228905#M502947</guid>
      <dc:creator />
      <dc:date>2010-07-21T10:25:05Z</dc:date>
    </item>
    <item>
      <title>Operations with variables</title>
      <link>https://community.qlik.com/t5/QlikView/Operations-with-variables/m-p/228906#M502948</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 tried to work on another PC.&lt;BR /&gt;In this case everything works well and I have no problems.&lt;BR /&gt;It is therefore a bad installation on this PC&lt;BR /&gt;&lt;BR /&gt;Thank you very much for your help and directions to Formula&lt;/P&gt;&lt;P&gt;Adriano&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Jul 2010 11:11:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Operations-with-variables/m-p/228906#M502948</guid>
      <dc:creator />
      <dc:date>2010-07-21T11:11:01Z</dc:date>
    </item>
  </channel>
</rss>

