<?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 divide by 0 in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/divide-by-0/m-p/322499#M498840</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So, do you still have a problem or are you satisfied with this solution?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Depending on your business problem, it might be good to check for zero sum first and then calculate the division (if not zero), or use a fixed number like 100% or special expression that is confirm with the requirements of your business logic (or just state like 'n.a.' non available).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a nice evening,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 01 Aug 2011 20:47:51 GMT</pubDate>
    <dc:creator>swuehl</dc:creator>
    <dc:date>2011-08-01T20:47:51Z</dc:date>
    <item>
      <title>divide by 0</title>
      <link>https://community.qlik.com/t5/QlikView/divide-by-0/m-p/322495#M498836</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 have my pivot table with many expressions. Some of them is calcuated by 0 because for formula. When I have 2 expression calculated for separated don´t give error and the expression shows the 'minus.png' because obviously (number/0). But when did it the same thing with another calculation the result gives nothing, just a blanks. I left an example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Aug 2011 18:05:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/divide-by-0/m-p/322495#M498836</guid>
      <dc:creator>pgalvezt</dc:creator>
      <dc:date>2011-08-01T18:05:18Z</dc:date>
    </item>
    <item>
      <title>divide by 0</title>
      <link>https://community.qlik.com/t5/QlikView/divide-by-0/m-p/322496#M498837</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; I´m Sorry I forgot the values:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;328/0.95 = 345,3&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;0/0 = Blanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I did this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF(count({&amp;lt;AT1}&amp;gt;}(if (InYear (Fecha, Today(), 0), AT1)))/Sum( {$&amp;lt;YEAR = {$(#=Max(YEAR))}&amp;gt;} ATX) = ' ', 'qmem://&amp;lt;bundled&amp;gt;/BuiltIn/minus.png',&lt;/P&gt;&lt;P&gt;IF(count({&amp;lt;AT1}&amp;gt;}(if (InYear (Fecha, Today(), 0), AT1)))/Sum( {$&amp;lt;YEAR = {$(#=Max(YEAR))}&amp;gt;} ATX) &amp;gt; 0, &lt;/P&gt;&lt;P&gt;(count({&amp;lt;AT1}&amp;gt;}(if (InYear (Fecha, Today(), 0), AT1)))/Sum( {$&amp;lt;YEAR = {$(#=Max(YEAR))}&amp;gt;} ATX))))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #00b400; font-size: 8pt;"&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Aug 2011 18:15:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/divide-by-0/m-p/322496#M498837</guid>
      <dc:creator>pgalvezt</dc:creator>
      <dc:date>2011-08-01T18:15:01Z</dc:date>
    </item>
    <item>
      <title>Re: divide by 0</title>
      <link>https://community.qlik.com/t5/QlikView/divide-by-0/m-p/322497#M498838</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;well, I am not sure if i got your point:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Sum( {$&amp;lt;YEAR = {$(#=Max(YEAR))}&amp;gt;} ATX)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;results in 0?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;count({&amp;lt;AT1}&amp;gt;}(if (InYear (Fecha, Today(), 0), AT1)))/Sum( {$&amp;lt;YEAR = {$(#=Max(YEAR))}&amp;gt;} ATX)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;gives you a blank?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Well, I am not sure that comparing the above expression to a blank (one or more&lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/wink.png" /&gt;?) will work. It is better to check the first expression on zero.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also didn't get your point with&lt;/P&gt;&lt;P&gt;328/0.95 = 345,3&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;except that there is a mixup of decimal point format (it this just a type?).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Aug 2011 19:25:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/divide-by-0/m-p/322497#M498838</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2011-08-01T19:25:57Z</dc:date>
    </item>
    <item>
      <title>Re: divide by 0</title>
      <link>https://community.qlik.com/t5/QlikView/divide-by-0/m-p/322498#M498839</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Swuehl thanks for answering, I just to showed you one line. There are many lines in my table with many results distinct that 0. Now the reason bacause gave 0 is due there is no data into the database for that month specificaly. So I have an expression that gave maior that 0 but I have another expression that in sometimes gave 0. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;count({&amp;lt;AT1}&amp;gt;}(if (InYear (Fecha, Today(), 0), AT1)))/Sum( {$&amp;lt;YEAR = {$(#=Max(YEAR))}&amp;gt;} ATX) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is because no data into the database &lt;/P&gt;Sum( {$&amp;lt;YEAR = {$(#=Max(YEAR))}&amp;gt;} ATX) = 0.&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but I did this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;=count({&amp;lt;AT1}&amp;gt;}(if (InYear (Fecha, Today(), -1), AT1)))/if(Sum( {$&amp;lt;YEAR = {$(#=Min(YEAR))}&amp;gt;} ATX) = 0, '0,01',&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so all the formulas is divide by 0,01 and no with 0. I don´t know what more to do. now the indicators changed to green. &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks Again. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Aug 2011 20:25:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/divide-by-0/m-p/322498#M498839</guid>
      <dc:creator>pgalvezt</dc:creator>
      <dc:date>2011-08-01T20:25:05Z</dc:date>
    </item>
    <item>
      <title>divide by 0</title>
      <link>https://community.qlik.com/t5/QlikView/divide-by-0/m-p/322499#M498840</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So, do you still have a problem or are you satisfied with this solution?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Depending on your business problem, it might be good to check for zero sum first and then calculate the division (if not zero), or use a fixed number like 100% or special expression that is confirm with the requirements of your business logic (or just state like 'n.a.' non available).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a nice evening,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Aug 2011 20:47:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/divide-by-0/m-p/322499#M498840</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2011-08-01T20:47:51Z</dc:date>
    </item>
    <item>
      <title>Re: divide by 0</title>
      <link>https://community.qlik.com/t5/QlikView/divide-by-0/m-p/322500#M498841</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; For now is better that formula that I put. the message that qlikview live is too long. The manager people don´t like the massage of QlikView for default.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Aug 2011 21:01:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/divide-by-0/m-p/322500#M498841</guid>
      <dc:creator>pgalvezt</dc:creator>
      <dc:date>2011-08-01T21:01:00Z</dc:date>
    </item>
  </channel>
</rss>

