<?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: Formula does not work in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Formula-does-not-work/m-p/597821#M1109491</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;many thanks all !!! issue resolved &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/wink.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 04 Mar 2014 14:58:58 GMT</pubDate>
    <dc:creator>danialier</dc:creator>
    <dc:date>2014-03-04T14:58:58Z</dc:date>
    <item>
      <title>Formula does not work</title>
      <link>https://community.qlik.com/t5/QlikView/Formula-does-not-work/m-p/597814#M1109481</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone help me on that ? I have a Bar Chart where I want to show the evolution of the hardware units but in each column (so in each month) I want to show the delta of units from the current month vs the previous one.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As an example, if I have: January 22units sold / Februrary 32 units sold / March 15 units sold. Then I want the columns to show a bar as follows: February a total of +10units (this is 32-22 units) and March a total of -17units (this is 15-32 units).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm using the following formula but it does not work...&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;=&lt;SPAN style="font-size: 10pt;"&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;num&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 10pt;"&gt;Product&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;={'Hardware'},&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 10pt;"&gt;Month&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;={&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style="color: #808080; font-size: 10pt;"&gt;&lt;STRONG&gt;&lt;EM style="color: #808080; font-size: 10pt;"&gt;$(=Month)&lt;/EM&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;}&amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 10pt;"&gt;Units&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;) - &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 10pt;"&gt;Product&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;={'Hardware'},&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 10pt;"&gt;Month&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;={&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style="color: #808080; font-size: 10pt;"&gt;&lt;STRONG&gt;&lt;EM style="color: #808080; font-size: 10pt;"&gt;$(=(Month)-1)&lt;/EM&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt;}&amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 10pt;"&gt;Units&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Thanks!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;dani&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Mar 2014 12:16:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Formula-does-not-work/m-p/597814#M1109481</guid>
      <dc:creator>danialier</dc:creator>
      <dc:date>2014-03-04T12:16:11Z</dc:date>
    </item>
    <item>
      <title>Re: Formula does not work</title>
      <link>https://community.qlik.com/t5/QlikView/Formula-does-not-work/m-p/597815#M1109482</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;in set analysis it will not work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you can calculate one more field at script level which will show the value after subtraction.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Nilesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Mar 2014 12:23:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Formula-does-not-work/m-p/597815#M1109482</guid>
      <dc:creator>nilesh_gangurde</dc:creator>
      <dc:date>2014-03-04T12:23:59Z</dc:date>
    </item>
    <item>
      <title>Re: Formula does not work</title>
      <link>https://community.qlik.com/t5/QlikView/Formula-does-not-work/m-p/597816#M1109483</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You are not able to use set analysis in this case.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Either&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Handle in load script level.&lt;/P&gt;&lt;P&gt;2. Create another expression and make it invisible.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Invisible Express (Helper): &lt;SPAN style="font-size: 10pt;"&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 10pt;"&gt;Product&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;={'Hardware'}&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;&amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 10pt;"&gt;Units&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Actual Express for bar chart: =Helper - Above(Helper) &lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Mar 2014 12:28:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Formula-does-not-work/m-p/597816#M1109483</guid>
      <dc:creator />
      <dc:date>2014-03-04T12:28:27Z</dc:date>
    </item>
    <item>
      <title>Re: Formula does not work</title>
      <link>https://community.qlik.com/t5/QlikView/Formula-does-not-work/m-p/597817#M1109485</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dani,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Set Analysis are computed ONCE per chart&lt;/STRONG&gt;. They cannot return different values according to the row or column of the chart. So, it will certainly not work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want different result per line/row:&lt;/P&gt;&lt;P&gt;You will need to use functions like &lt;STRONG&gt;above&lt;/STRONG&gt;() or &lt;STRONG&gt;before&lt;/STRONG&gt;()&lt;/P&gt;&lt;P&gt;You will need to modify your model. See a doc I have written on that topic: &lt;A href="http://community.qlik.com/docs/DOC-4821"&gt;http://community.qlik.com/docs/DOC-4821&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Fabrice&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Mar 2014 13:15:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Formula-does-not-work/m-p/597817#M1109485</guid>
      <dc:creator />
      <dc:date>2014-03-04T13:15:59Z</dc:date>
    </item>
    <item>
      <title>Re: Formula does not work</title>
      <link>https://community.qlik.com/t5/QlikView/Formula-does-not-work/m-p/597818#M1109486</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Dani, why don't you calculate the shift in the script and use the simple expression (Units Sold - Shift) in your bar chart.&lt;/P&gt;&lt;P&gt;See example below:&lt;IMG alt="QVTEST.jpg" class="jive-image" src="https://community.qlik.com/legacyfs/online/54234_QVTEST.jpg" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Mar 2014 13:45:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Formula-does-not-work/m-p/597818#M1109486</guid>
      <dc:creator>veidlburkhard</dc:creator>
      <dc:date>2014-03-04T13:45:56Z</dc:date>
    </item>
    <item>
      <title>Re: Formula does not work</title>
      <link>https://community.qlik.com/t5/QlikView/Formula-does-not-work/m-p/597819#M1109488</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;try this&lt;/P&gt;&lt;P&gt;=num(sum({&amp;lt;Product={'Hardware'},Month={'$(=Month)'}&amp;gt;}Units)) - num(sum({&amp;lt;Product={'Hardware'},Month={$(=Month(MonthStart(Max(Date))-1))}&amp;gt;}Units))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Mar 2014 14:31:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Formula-does-not-work/m-p/597819#M1109488</guid>
      <dc:creator>PrashantSangle</dc:creator>
      <dc:date>2014-03-04T14:31:32Z</dc:date>
    </item>
    <item>
      <title>Re: Formula does not work</title>
      <link>https://community.qlik.com/t5/QlikView/Formula-does-not-work/m-p/597820#M1109489</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;As others have said, you cannot use set analysis in this context, but Above() may be what you need if you want to do the calculation in an expression and not in script. Something like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=sum({&amp;lt;Product={'Hardware'}&amp;gt;}Units) - Above(sum({&amp;lt;Product={'Hardware'}&amp;gt;}Units))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(Above(TOTAL ...) if you have multiple dimensions)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HTH&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Mar 2014 14:44:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Formula-does-not-work/m-p/597820#M1109489</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2014-03-04T14:44:07Z</dc:date>
    </item>
    <item>
      <title>Re: Formula does not work</title>
      <link>https://community.qlik.com/t5/QlikView/Formula-does-not-work/m-p/597821#M1109491</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;many thanks all !!! issue resolved &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/wink.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Mar 2014 14:58:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Formula-does-not-work/m-p/597821#M1109491</guid>
      <dc:creator>danialier</dc:creator>
      <dc:date>2014-03-04T14:58:58Z</dc:date>
    </item>
  </channel>
</rss>

