<?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 Sum with variable not showing the expected result in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Sum-with-variable-not-showing-the-expected-result/m-p/2466120#M99229</link>
    <description>&lt;P&gt;Hi All,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have this weird behavior in my pivot chart I don't succeed to explain and hope you will find an explanation !&lt;/P&gt;
&lt;P&gt;I have:&amp;nbsp;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;a variable called&amp;nbsp;&lt;EM&gt;vSalesInno_Month&lt;/EM&gt; defined as&lt;BR /&gt;Sum({$&amp;lt;MonthDiff={0}&amp;gt;}&amp;nbsp;if(LaunchDate&amp;gt;=$(vInnoStartMonth),1,0)*[€ PUB])&amp;nbsp;&lt;/LI&gt;
&lt;LI&gt;&lt;EM&gt;Sales&lt;/EM&gt; as Expression in my chart &lt;BR /&gt;=&amp;nbsp;Sum({$&amp;lt;MonthDiff={0}&amp;gt;} [€ PUB])&lt;/LI&gt;
&lt;LI&gt;&lt;EM&gt;Sales_wo_Inno&lt;/EM&gt; as Expression in may chart &lt;BR /&gt;=&amp;nbsp;Sum({$&amp;lt;MonthDiff={0}&amp;gt;} [€ PUB])-$(vSalesInno_Month)&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;in the chart, I have the right figures for&lt;BR /&gt;- vSalesInno&lt;BR /&gt;- Sales&lt;BR /&gt;but not Sales_wo_Inno i.e. Sales_wo_Inno &amp;lt;&amp;gt; Sales - vSalesInno_Month as written in the expression&lt;/P&gt;
&lt;P&gt;I know vSalesInno_Month is the right figure as I also put the full formula in another expression to check whether this was the issue, and the result shown is the exact same one as just writing&amp;nbsp;&lt;EM&gt;=$(vSalesInno_Month)&lt;/EM&gt; in the Expression box.&lt;/P&gt;
&lt;P&gt;anyone any clue?&lt;/P&gt;
&lt;P&gt;thanks a lot for your help!&lt;/P&gt;</description>
    <pubDate>Thu, 27 Jun 2024 15:17:07 GMT</pubDate>
    <dc:creator>Delphines</dc:creator>
    <dc:date>2024-06-27T15:17:07Z</dc:date>
    <item>
      <title>Sum with variable not showing the expected result</title>
      <link>https://community.qlik.com/t5/App-Development/Sum-with-variable-not-showing-the-expected-result/m-p/2466120#M99229</link>
      <description>&lt;P&gt;Hi All,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have this weird behavior in my pivot chart I don't succeed to explain and hope you will find an explanation !&lt;/P&gt;
&lt;P&gt;I have:&amp;nbsp;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;a variable called&amp;nbsp;&lt;EM&gt;vSalesInno_Month&lt;/EM&gt; defined as&lt;BR /&gt;Sum({$&amp;lt;MonthDiff={0}&amp;gt;}&amp;nbsp;if(LaunchDate&amp;gt;=$(vInnoStartMonth),1,0)*[€ PUB])&amp;nbsp;&lt;/LI&gt;
&lt;LI&gt;&lt;EM&gt;Sales&lt;/EM&gt; as Expression in my chart &lt;BR /&gt;=&amp;nbsp;Sum({$&amp;lt;MonthDiff={0}&amp;gt;} [€ PUB])&lt;/LI&gt;
&lt;LI&gt;&lt;EM&gt;Sales_wo_Inno&lt;/EM&gt; as Expression in may chart &lt;BR /&gt;=&amp;nbsp;Sum({$&amp;lt;MonthDiff={0}&amp;gt;} [€ PUB])-$(vSalesInno_Month)&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;in the chart, I have the right figures for&lt;BR /&gt;- vSalesInno&lt;BR /&gt;- Sales&lt;BR /&gt;but not Sales_wo_Inno i.e. Sales_wo_Inno &amp;lt;&amp;gt; Sales - vSalesInno_Month as written in the expression&lt;/P&gt;
&lt;P&gt;I know vSalesInno_Month is the right figure as I also put the full formula in another expression to check whether this was the issue, and the result shown is the exact same one as just writing&amp;nbsp;&lt;EM&gt;=$(vSalesInno_Month)&lt;/EM&gt; in the Expression box.&lt;/P&gt;
&lt;P&gt;anyone any clue?&lt;/P&gt;
&lt;P&gt;thanks a lot for your help!&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jun 2024 15:17:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Sum-with-variable-not-showing-the-expected-result/m-p/2466120#M99229</guid>
      <dc:creator>Delphines</dc:creator>
      <dc:date>2024-06-27T15:17:07Z</dc:date>
    </item>
    <item>
      <title>Re: Sum with variable not showing the expected result</title>
      <link>https://community.qlik.com/t5/App-Development/Sum-with-variable-not-showing-the-expected-result/m-p/2466130#M99230</link>
      <description>&lt;P&gt;I found : I have to add parenthesis for the variable and write&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Sum({$&amp;lt;MonthDiff={0}&amp;gt;} [€ PUB])-&lt;STRONG&gt;&lt;FONT color="#0000FF"&gt;(&lt;/FONT&gt;&lt;/STRONG&gt;$(vSalesInno_Month)&lt;FONT color="#0000FF"&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;FONT color="#000000"&gt; instead.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jun 2024 15:53:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Sum-with-variable-not-showing-the-expected-result/m-p/2466130#M99230</guid>
      <dc:creator>Delphines</dc:creator>
      <dc:date>2024-06-27T15:53:10Z</dc:date>
    </item>
  </channel>
</rss>

