<?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 Year over Year Calculation in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Year-over-Year-Calculation/m-p/1449680#M434040</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;I am trying to show year on year(YoY) comparison in a straight table. But when the sum of a particular category is 0 in the previous year, it's not showing any value, even though the next year has a value &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;E.g. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2016 2017&lt;/P&gt;&lt;P&gt;0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 100&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I expect to see 100% increase &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried using this formula but it's not working properly&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(Sum({$&amp;lt;Year = {2016}&amp;gt;}[USD Amount]) = 0, '100%', &lt;/P&gt;&lt;P&gt;(fabs(Sum({$&amp;lt;Year = {2017}&amp;gt;}[USD Amount]))-fabs(Sum({$&amp;lt;Year = {2016}&amp;gt;}[USD Amount])))/fabs(Sum({$&amp;lt;Year = {2016}&amp;gt;}[USD Amount])))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The formula works partly as it also shows 100% when 2017 value is 0 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to add a condition where if both the years are 0, then it's 0%, otherwise calculate. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help is appreciated &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sunny&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 08 Dec 2017 13:45:47 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2017-12-08T13:45:47Z</dc:date>
    <item>
      <title>Year over Year Calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Year-over-Year-Calculation/m-p/1449680#M434040</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;I am trying to show year on year(YoY) comparison in a straight table. But when the sum of a particular category is 0 in the previous year, it's not showing any value, even though the next year has a value &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;E.g. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2016 2017&lt;/P&gt;&lt;P&gt;0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 100&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I expect to see 100% increase &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried using this formula but it's not working properly&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(Sum({$&amp;lt;Year = {2016}&amp;gt;}[USD Amount]) = 0, '100%', &lt;/P&gt;&lt;P&gt;(fabs(Sum({$&amp;lt;Year = {2017}&amp;gt;}[USD Amount]))-fabs(Sum({$&amp;lt;Year = {2016}&amp;gt;}[USD Amount])))/fabs(Sum({$&amp;lt;Year = {2016}&amp;gt;}[USD Amount])))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The formula works partly as it also shows 100% when 2017 value is 0 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to add a condition where if both the years are 0, then it's 0%, otherwise calculate. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help is appreciated &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sunny&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Dec 2017 13:45:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Year-over-Year-Calculation/m-p/1449680#M434040</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-12-08T13:45:47Z</dc:date>
    </item>
    <item>
      <title>Re: Year over Year Calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Year-over-Year-Calculation/m-p/1449681#M434041</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be try this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;If(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Sum({$&amp;lt;Year = {2016}&amp;gt;}[USD Amount]) = 0,&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Sum({$&amp;lt;Year = {2017}&amp;gt;}[USD Amount]) = 0, '0%', '100%'),&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/STRONG&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;(fabs(Sum({$&amp;lt;Year = {2017}&amp;gt;}[USD Amount]))-fabs(Sum({$&amp;lt;Year = {2016}&amp;gt;}[USD Amount])))/fabs(Sum({$&amp;lt;Year = {2016}&amp;gt;}[USD Amount])))&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Dec 2017 14:01:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Year-over-Year-Calculation/m-p/1449681#M434041</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-12-08T14:01:18Z</dc:date>
    </item>
    <item>
      <title>Re: Year over Year Calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Year-over-Year-Calculation/m-p/1449682#M434042</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks dude, it works &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Dec 2017 07:39:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Year-over-Year-Calculation/m-p/1449682#M434042</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-12-11T07:39:44Z</dc:date>
    </item>
  </channel>
</rss>

