<?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: Growth Rate calculation in negative figures in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Growth-Rate-calculation-in-negative-figures/m-p/139753#M20852</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;maybe something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_15388598502609466 jive_text_macro" jivemacro_uid="_15388598502609466"&gt;
&lt;P&gt;Num(Sum({$&amp;lt;YEAR={'2018'}&amp;gt;}[Nos])/Sum({$&amp;lt;YEAR={'2017'}&amp;gt;}[Nos])-1,'0%')&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this helps&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Marco&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 06 Oct 2018 21:04:19 GMT</pubDate>
    <dc:creator>MarcoWedel</dc:creator>
    <dc:date>2018-10-06T21:04:19Z</dc:date>
    <item>
      <title>Growth Rate calculation in negative figures</title>
      <link>https://community.qlik.com/t5/QlikView/Growth-Rate-calculation-in-negative-figures/m-p/139752#M20851</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Friends &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have two negative figures in my data table for two years as shown below, I want to calculate the growth rate over previous years and I have written following expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2018&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2017&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Growth&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" width="160"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD align="right" class="xl63" height="17" width="80"&gt;-127,252&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-left: none;" width="80"&gt;-154,523&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;((sum({$&amp;lt;YEAR={'2018'}&amp;gt;}[Nos])/&lt;/P&gt;&lt;P&gt;fabs(sum({$&amp;lt;&lt;SPAN style="font-size: 13.3333px;"&gt;YEAR={'2017'}&lt;/SPAN&gt;&amp;gt;}[Nos])))-1)*100&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Results&amp;nbsp; -182.4%&amp;nbsp; But actually the growth rate should be 18%.&lt;/P&gt;&lt;P&gt;Pls help me to correct my formula to get correct results&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 06 Oct 2018 06:26:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Growth-Rate-calculation-in-negative-figures/m-p/139752#M20851</guid>
      <dc:creator>upaliwije</dc:creator>
      <dc:date>2018-10-06T06:26:40Z</dc:date>
    </item>
    <item>
      <title>Re: Growth Rate calculation in negative figures</title>
      <link>https://community.qlik.com/t5/QlikView/Growth-Rate-calculation-in-negative-figures/m-p/139753#M20852</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;maybe something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_15388598502609466 jive_text_macro" jivemacro_uid="_15388598502609466"&gt;
&lt;P&gt;Num(Sum({$&amp;lt;YEAR={'2018'}&amp;gt;}[Nos])/Sum({$&amp;lt;YEAR={'2017'}&amp;gt;}[Nos])-1,'0%')&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this helps&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Marco&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 06 Oct 2018 21:04:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Growth-Rate-calculation-in-negative-figures/m-p/139753#M20852</guid>
      <dc:creator>MarcoWedel</dc:creator>
      <dc:date>2018-10-06T21:04:19Z</dc:date>
    </item>
    <item>
      <title>Re: Growth Rate calculation in negative figures</title>
      <link>https://community.qlik.com/t5/QlikView/Growth-Rate-calculation-in-negative-figures/m-p/139754#M20853</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;You should do the difference between 2017 and 2018 and then divide to the total of 2017.&lt;/P&gt;&lt;P&gt;In this case with a negative base you need to use fabs to get the absolute value.&lt;/P&gt;&lt;P&gt;You're interested in the positive sign between 2017 and 2018 that is +18% &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(sum({$&amp;lt;Year={'2018'}&amp;gt;} Nos)-sum({$&amp;lt;Year={'2017'}&amp;gt;} Nos))/&lt;/P&gt;&lt;P&gt;fabs(sum({$&amp;lt;Year={'2017'}&amp;gt;} Nos))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then flag show value in % in format&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this helps&lt;/P&gt;&lt;P&gt;Matteo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 07 Oct 2018 10:34:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Growth-Rate-calculation-in-negative-figures/m-p/139754#M20853</guid>
      <dc:creator>captain89</dc:creator>
      <dc:date>2018-10-07T10:34:08Z</dc:date>
    </item>
    <item>
      <title>Re: Growth Rate calculation in negative figures</title>
      <link>https://community.qlik.com/t5/QlikView/Growth-Rate-calculation-in-negative-figures/m-p/139755#M20854</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Friends,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pls help me to get my formula corrected&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 07 Oct 2018 11:45:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Growth-Rate-calculation-in-negative-figures/m-p/139755#M20854</guid>
      <dc:creator>upaliwije</dc:creator>
      <dc:date>2018-10-07T11:45:01Z</dc:date>
    </item>
    <item>
      <title>Re: Growth Rate calculation in negative figures</title>
      <link>https://community.qlik.com/t5/QlikView/Growth-Rate-calculation-in-negative-figures/m-p/139756#M20855</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It looks like your question has been correctly answered above. If you feel these answers are not correct, you're going to have to elaborate... &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 07 Oct 2018 11:52:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Growth-Rate-calculation-in-negative-figures/m-p/139756#M20855</guid>
      <dc:creator>Or</dc:creator>
      <dc:date>2018-10-07T11:52:37Z</dc:date>
    </item>
    <item>
      <title>Re: Growth Rate calculation in negative figures</title>
      <link>https://community.qlik.com/t5/QlikView/Growth-Rate-calculation-in-negative-figures/m-p/139757#M20856</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Macro, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Still the results is the same.No change.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 07 Oct 2018 11:55:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Growth-Rate-calculation-in-negative-figures/m-p/139757#M20856</guid>
      <dc:creator>upaliwije</dc:creator>
      <dc:date>2018-10-07T11:55:55Z</dc:date>
    </item>
    <item>
      <title>Re: Growth Rate calculation in negative figures</title>
      <link>https://community.qlik.com/t5/QlikView/Growth-Rate-calculation-in-negative-figures/m-p/139758#M20857</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When I apply your expression&amp;nbsp; the result is the same.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 07 Oct 2018 12:00:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Growth-Rate-calculation-in-negative-figures/m-p/139758#M20857</guid>
      <dc:creator>upaliwije</dc:creator>
      <dc:date>2018-10-07T12:00:52Z</dc:date>
    </item>
    <item>
      <title>Re: Growth Rate calculation in negative figures</title>
      <link>https://community.qlik.com/t5/QlikView/Growth-Rate-calculation-in-negative-figures/m-p/139759#M20858</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think that you did a pivot table. And the year in this case is a dimension.&lt;/P&gt;&lt;P&gt;Try using another approach.&lt;/P&gt;&lt;P&gt;Create two variables: vYear= max(Year) and vYear_1 = max(Year)-1&lt;/P&gt;&lt;P&gt;Then you make a table with 3 expressions:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px; background-color: #f2f2f2;"&gt;sum({$&amp;lt;Year={'$(vYear)'}&amp;gt;} Nos) and in the label put =&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px; background-color: #f2f2f2;"&gt;$(vYear)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 12px; background-color: #f2f2f2; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;sum({$&amp;lt;Year={'$(vYear_1)'}&amp;gt;} Nos) and in the label put =&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px; background-color: #f2f2f2;"&gt;$(vYear_1)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;(sum({$&amp;lt;Year={'$(vYear)'}&amp;gt;} Nos)-sum({$&amp;lt;Year={&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px; background-color: #f2f2f2;"&gt;'$(vYear_1)'&lt;/SPAN&gt;}&amp;gt;} Nos))/ fabs(sum({$&amp;lt;Year={'&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px; background-color: #f2f2f2;"&gt;$(vYear_1)'&lt;/SPAN&gt;}&amp;gt;} Nos))&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;so if you select 2018 in&amp;nbsp; the dimension year you get 2018, 2017 and the growth&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;hope this helps&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 12px; background-color: #f2f2f2; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px; background-color: #f2f2f2;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 07 Oct 2018 13:17:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Growth-Rate-calculation-in-negative-figures/m-p/139759#M20858</guid>
      <dc:creator>captain89</dc:creator>
      <dc:date>2018-10-07T13:17:25Z</dc:date>
    </item>
    <item>
      <title>Re: Growth Rate calculation in negative figures</title>
      <link>https://community.qlik.com/t5/QlikView/Growth-Rate-calculation-in-negative-figures/m-p/139760#M20859</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Seems to work for me:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="QlikCommunity_Thread_316087_Pic1.JPG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/215298_QlikCommunity_Thread_316087_Pic1.JPG" style="height: 89px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you post a sample application where you're getting a different result?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Marco&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 07 Oct 2018 22:48:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Growth-Rate-calculation-in-negative-figures/m-p/139760#M20859</guid>
      <dc:creator>MarcoWedel</dc:creator>
      <dc:date>2018-10-07T22:48:55Z</dc:date>
    </item>
    <item>
      <title>Re: Growth Rate calculation in negative figures</title>
      <link>https://community.qlik.com/t5/QlikView/Growth-Rate-calculation-in-negative-figures/m-p/139761#M20860</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Macro&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It works that way. But the It should be positive percentage since the 2018 Negative figure is less than the negative figure of 2017. Am I correct ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Oct 2018 04:09:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Growth-Rate-calculation-in-negative-figures/m-p/139761#M20860</guid>
      <dc:creator>upaliwije</dc:creator>
      <dc:date>2018-10-08T04:09:04Z</dc:date>
    </item>
    <item>
      <title>Re: Growth Rate calculation in negative figures</title>
      <link>https://community.qlik.com/t5/QlikView/Growth-Rate-calculation-in-negative-figures/m-p/139762#M20861</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That's impossible.&lt;/P&gt;&lt;P&gt;I tried and the result is right. &lt;/P&gt;&lt;P&gt;Is there a problem in your data model? &lt;/P&gt;&lt;P&gt;please see attachment&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Oct 2018 09:16:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Growth-Rate-calculation-in-negative-figures/m-p/139762#M20861</guid>
      <dc:creator>captain89</dc:creator>
      <dc:date>2018-10-08T09:16:18Z</dc:date>
    </item>
    <item>
      <title>Re: Growth Rate calculation in negative figures</title>
      <link>https://community.qlik.com/t5/QlikView/Growth-Rate-calculation-in-negative-figures/m-p/139763#M20862</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It's a negative percentage of a negative value resulting in a positive difference. So you have an alternative definition?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Oct 2018 09:41:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Growth-Rate-calculation-in-negative-figures/m-p/139763#M20862</guid>
      <dc:creator>MarcoWedel</dc:creator>
      <dc:date>2018-10-08T09:41:33Z</dc:date>
    </item>
    <item>
      <title>Re: Growth Rate calculation in negative figures</title>
      <link>https://community.qlik.com/t5/QlikView/Growth-Rate-calculation-in-negative-figures/m-p/139764#M20863</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The Wall Street Journal has an old &lt;A href="http://www.wsj.com/public/resources/documents/doe-help.htm#netincome" target="_blank"&gt;guide to earnings reports&lt;/A&gt; that says this:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Net Income percent change is the change from the same period from a year ago. &lt;STRONG&gt;Percent change is not provided&lt;/STRONG&gt; if either the latest period or the year-ago period &lt;STRONG&gt;contains a net loss [negative number]&lt;/STRONG&gt;. On the digest page, if a company posts a profit in the latest period against a loss in the year-ago period, the percent change is represented as a “P”. Similarly, if a company posts a loss in the latest period against a profit in the year-ago period, the percent change is represented as a “L”.&amp;nbsp; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you insist on calculating this - and you shouldn't, in my opinion - you can write an IF() statement to check which figure is bigger. If 2017 is smaller (that is, more negative) and both values are negative, you can multiply the result by -1 to get "positive growth". This is, however, not really correct... there is no positive growth here, merely reduction in losses. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Oct 2018 11:14:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Growth-Rate-calculation-in-negative-figures/m-p/139764#M20863</guid>
      <dc:creator>Or</dc:creator>
      <dc:date>2018-10-08T11:14:17Z</dc:date>
    </item>
  </channel>
</rss>

