<?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 Do Not Ignore Zero In Count in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Do-Not-Ignore-Zero-In-Count/m-p/1362633#M417430</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi there, Im new to qlikview and Im working to calculate the average sales per week. Let's say I have the following data&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid #000000; width: 100%;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;ITEM&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;WEEK 1&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;WEEK 2&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;10001&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;100&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;0&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Im trying to find the average sales per week so Im using count(distinct week). But it looks it only counts week 1 rather than two weeks as there is no sale in week 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any suggestions?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alright I cant figure this out so Im posting our current QV app. Im trying to calculate average sales per week per rooftop. As you can see in the top row the total rooftops is 799, but when involved in the calculation it becomes the number of rooftops that sells certain items. The same happened to weeks. My expression used was COUNT(DISTINCT ROOFTOPS) and my formulate to get the average is SUM(SALES)/COUNT(DISTINCT ROOFTOPS)/COUNT(DISTINCT WEEK). Ideally ROOFTOPS is always the total number (799) and the number of weeks should always be 20.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/165395_Capture.PNG" style="height: 403px; width: 620px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 30 May 2017 18:32:50 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2017-05-30T18:32:50Z</dc:date>
    <item>
      <title>Do Not Ignore Zero In Count</title>
      <link>https://community.qlik.com/t5/QlikView/Do-Not-Ignore-Zero-In-Count/m-p/1362633#M417430</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi there, Im new to qlikview and Im working to calculate the average sales per week. Let's say I have the following data&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid #000000; width: 100%;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;ITEM&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;WEEK 1&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;WEEK 2&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;10001&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;100&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;0&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Im trying to find the average sales per week so Im using count(distinct week). But it looks it only counts week 1 rather than two weeks as there is no sale in week 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any suggestions?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alright I cant figure this out so Im posting our current QV app. Im trying to calculate average sales per week per rooftop. As you can see in the top row the total rooftops is 799, but when involved in the calculation it becomes the number of rooftops that sells certain items. The same happened to weeks. My expression used was COUNT(DISTINCT ROOFTOPS) and my formulate to get the average is SUM(SALES)/COUNT(DISTINCT ROOFTOPS)/COUNT(DISTINCT WEEK). Ideally ROOFTOPS is always the total number (799) and the number of weeks should always be 20.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/165395_Capture.PNG" style="height: 403px; width: 620px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 May 2017 18:32:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Do-Not-Ignore-Zero-In-Count/m-p/1362633#M417430</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-05-30T18:32:50Z</dc:date>
    </item>
    <item>
      <title>Re: Do Not Ignore Zero In Count</title>
      <link>https://community.qlik.com/t5/QlikView/Do-Not-Ignore-Zero-In-Count/m-p/1362634#M417431</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Would you be able to share few rows from your raw data?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 May 2017 18:43:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Do-Not-Ignore-Zero-In-Count/m-p/1362634#M417431</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-05-30T18:43:46Z</dc:date>
    </item>
    <item>
      <title>Re: Do Not Ignore Zero In Count</title>
      <link>https://community.qlik.com/t5/QlikView/Do-Not-Ignore-Zero-In-Count/m-p/1362635#M417432</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Unfortunately my company does not allow that. Actually the logic is like: so far we have 20 fiscal weeks and sales only incurs in 19 out of the 20. When I tried to calculate for average sales per week the count function captures 19 weeks rather than 20 weeks, because the system only captures 19 weeks. How could I enforce in qlikview so the chart captures 20 weeks regardless sales or not?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 May 2017 18:50:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Do-Not-Ignore-Zero-In-Count/m-p/1362635#M417432</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-05-30T18:50:35Z</dc:date>
    </item>
    <item>
      <title>Re: Do Not Ignore Zero In Count</title>
      <link>https://community.qlik.com/t5/QlikView/Do-Not-Ignore-Zero-In-Count/m-p/1362636#M417433</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What is the exact expression you are using? Count(Week) or Count(OfAnotherField)? I won't know what you are doing unless you share more information. See here:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/docs/DOC-1290"&gt;Preparing examples for Upload - Reduction and Data Scrambling&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/docs/DOC-2380"&gt;Qlik Community Tip: How to Get Answers to Your Post&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 May 2017 02:30:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Do-Not-Ignore-Zero-In-Count/m-p/1362636#M417433</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-05-31T02:30:53Z</dc:date>
    </item>
    <item>
      <title>Re: Do Not Ignore Zero In Count</title>
      <link>https://community.qlik.com/t5/QlikView/Do-Not-Ignore-Zero-In-Count/m-p/1362637#M417434</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would suggest you to first doing Cross Table then manipulate the same&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cross (Week, Data)&lt;/P&gt;&lt;P&gt;Load ITEM&lt;/P&gt;&lt;P&gt;from Table;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then you can use like below&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Count({&amp;lt;Week = {'*'}&amp;gt;}Week) &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Note - &lt;/STRONG&gt;This consider along with nulls, I assume this is you are expecting. If my direction is wrong please explain little more as Sunny mentioned the links&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 May 2017 02:35:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Do-Not-Ignore-Zero-In-Count/m-p/1362637#M417434</guid>
      <dc:creator>Anil_Babu_Samineni</dc:creator>
      <dc:date>2017-05-31T02:35:30Z</dc:date>
    </item>
    <item>
      <title>Re: Do Not Ignore Zero In Count</title>
      <link>https://community.qlik.com/t5/QlikView/Do-Not-Ignore-Zero-In-Count/m-p/1362638#M417435</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What do you get when you use below expression - &lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" height="80" src="https://community.qlik.com/legacyfs/online/165286_Capture.PNG" style="height: 79.4323px; width: 304px;" width="304" /&gt;&lt;/P&gt;&lt;P&gt;The sample data from you as - &lt;/P&gt;&lt;P&gt;Load * inline [&lt;/P&gt;&lt;P&gt;ITEM, WEEK, Sales&lt;/P&gt;&lt;P&gt;10001, WEEK1, 100&lt;/P&gt;&lt;P&gt;10001, WEEK2,0 };&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Share more info to help further as suggested by Experts.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 May 2017 04:06:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Do-Not-Ignore-Zero-In-Count/m-p/1362638#M417435</guid>
      <dc:creator>Digvijay_Singh</dc:creator>
      <dc:date>2017-05-31T04:06:35Z</dc:date>
    </item>
    <item>
      <title>Re: Do Not Ignore Zero In Count</title>
      <link>https://community.qlik.com/t5/QlikView/Do-Not-Ignore-Zero-In-Count/m-p/1362639#M417436</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, I have some more info added. Could you please take a look when you get a moment?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 May 2017 15:31:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Do-Not-Ignore-Zero-In-Count/m-p/1362639#M417436</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-05-31T15:31:13Z</dc:date>
    </item>
    <item>
      <title>Re: Do Not Ignore Zero In Count</title>
      <link>https://community.qlik.com/t5/QlikView/Do-Not-Ignore-Zero-In-Count/m-p/1362640#M417437</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, I have some more info added. Could you please take a look when you get a moment?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 May 2017 15:31:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Do-Not-Ignore-Zero-In-Count/m-p/1362640#M417437</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-05-31T15:31:25Z</dc:date>
    </item>
    <item>
      <title>Re: Do Not Ignore Zero In Count</title>
      <link>https://community.qlik.com/t5/QlikView/Do-Not-Ignore-Zero-In-Count/m-p/1362641#M417438</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;SUM(SALES)/COUNT(&lt;SPAN style="color: #ff0000;"&gt;TOTAL&lt;/SPAN&gt; DISTINCT ROOFTOPS)/COUNT(&lt;SPAN style="color: #ff0000;"&gt;TOTAL&lt;/SPAN&gt; DISTINCT WEEK)&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 May 2017 15:36:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Do-Not-Ignore-Zero-In-Count/m-p/1362641#M417438</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-05-31T15:36:31Z</dc:date>
    </item>
    <item>
      <title>Re: Do Not Ignore Zero In Count</title>
      <link>https://community.qlik.com/t5/QlikView/Do-Not-Ignore-Zero-In-Count/m-p/1362642#M417439</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It works! Thank you!!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 May 2017 15:47:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Do-Not-Ignore-Zero-In-Count/m-p/1362642#M417439</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-05-31T15:47:15Z</dc:date>
    </item>
  </channel>
</rss>

