<?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: divide in script - always zero as a result in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/divide-in-script-always-zero-as-a-result/m-p/1814562#M1212881</link>
    <description>&lt;P&gt;Yes indeed i looked at the values&lt;SPAN&gt;individually and i notice an issue.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;It was an issue regarding a left join which wasn't working right that's why i had no values.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks a lot&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 11 Jun 2021 15:50:14 GMT</pubDate>
    <dc:creator>LESSASSY_K</dc:creator>
    <dc:date>2021-06-11T15:50:14Z</dc:date>
    <item>
      <title>divide in script - always zero as a result</title>
      <link>https://community.qlik.com/t5/QlikView/divide-in-script-always-zero-as-a-result/m-p/1814146#M1212833</link>
      <description>&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have an issue regarding a division in my qlikview app/script&lt;/P&gt;&lt;P&gt;I tried to to that:&lt;/P&gt;&lt;P&gt;ALT(((SUM(FLUX_PIECES_POIDS_PLASTIQUE) * SUM(QTY_ON_HAND))/SUM(SALES_MULTIPLE)),0) as PIECES_POIDS_EMBALLAGE_PLASTIQUE, //Poids emballage pièce plastique&lt;BR /&gt;ALT(((SUM(FLUX_PIECES_POIDS_CARTON) * SUM(QTY_ON_HAND))/SUM(SALES_MULTIPLE)),0) as PIECES_POIDS_EMBALLAGE_CARTON, //Poids emballage pièce plastique&lt;BR /&gt;ALT(((SUM(FLUX_PIECES_POIDS_BOIS) * SUM(QTY_ON_HAND))/SUM(SALES_MULTIPLE)),0) as PIECES_POIDS_EMBALLAGE_BOIS //Poids emballage pièce plastique&lt;/P&gt;&lt;P&gt;But as a result i always get zero values.&lt;/P&gt;&lt;P&gt;I don't understand what i did wrong.&lt;/P&gt;&lt;P&gt;Of course i used a group by.&lt;/P&gt;&lt;P&gt;Even if i don't use aggregation and group by i get zero as a result from these 3 calculated measure. Anyone could help please.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 10 Jun 2021 10:53:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/divide-in-script-always-zero-as-a-result/m-p/1814146#M1212833</guid>
      <dc:creator>LESSASSY_K</dc:creator>
      <dc:date>2021-06-10T10:53:25Z</dc:date>
    </item>
    <item>
      <title>Re: divide in script - always zero as a result</title>
      <link>https://community.qlik.com/t5/QlikView/divide-in-script-always-zero-as-a-result/m-p/1814183#M1212834</link>
      <description>&lt;P&gt;Anyone ???&lt;/P&gt;</description>
      <pubDate>Thu, 10 Jun 2021 12:57:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/divide-in-script-always-zero-as-a-result/m-p/1814183#M1212834</guid>
      <dc:creator>LESSASSY_K</dc:creator>
      <dc:date>2021-06-10T12:57:53Z</dc:date>
    </item>
    <item>
      <title>Re: divide in script - always zero as a result</title>
      <link>https://community.qlik.com/t5/QlikView/divide-in-script-always-zero-as-a-result/m-p/1814190#M1212835</link>
      <description>&lt;P&gt;Did you try looking at the values individually?&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;ALT(((SUM(FLUX_PIECES_POIDS_PLASTIQUE) * SUM(QTY_ON_HAND))/SUM(SALES_MULTIPLE)),0)&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;SUM(FLUX_PIECES_POIDS_PLASTIQUE) as tmp1,
SUM(QTY_ON_HAND) as tmp2,
SUM(SALES_MULTIPLE) as tmp3,
ALT(((SUM(FLUX_PIECES_POIDS_PLASTIQUE) * SUM(QTY_ON_HAND))/SUM(SALES_MULTIPLE)),0) as PIECES_POIDS_EMBALLAGE_PLASTIQUE&lt;/LI-CODE&gt;&lt;P&gt;You will get 0 in three scenarios&lt;/P&gt;&lt;P&gt;1) If tmp1 is 0 or&lt;BR /&gt;2) if tmp2 is 0 or&lt;BR /&gt;3) if tmp3 is 0&lt;/P&gt;&lt;P&gt;Do you see any rows where all three tmp1, tmp2, tmp3 are not 0 at the same time?&lt;/P&gt;</description>
      <pubDate>Thu, 10 Jun 2021 13:05:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/divide-in-script-always-zero-as-a-result/m-p/1814190#M1212835</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2021-06-10T13:05:45Z</dc:date>
    </item>
    <item>
      <title>Re: divide in script - always zero as a result</title>
      <link>https://community.qlik.com/t5/QlikView/divide-in-script-always-zero-as-a-result/m-p/1814562#M1212881</link>
      <description>&lt;P&gt;Yes indeed i looked at the values&lt;SPAN&gt;individually and i notice an issue.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;It was an issue regarding a left join which wasn't working right that's why i had no values.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks a lot&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Jun 2021 15:50:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/divide-in-script-always-zero-as-a-result/m-p/1814562#M1212881</guid>
      <dc:creator>LESSASSY_K</dc:creator>
      <dc:date>2021-06-11T15:50:14Z</dc:date>
    </item>
  </channel>
</rss>

