<?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 How to Count a Dimension with no Data in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-Count-a-Dimension-with-no-Data/m-p/988065#M961446</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm looking to calculate the quantity sold per year, which is fairly easy.&amp;nbsp; My statement is this:&lt;/P&gt;&lt;P&gt;=num(sum([Invoice Qty]) / Count(DISTINCT InvoiceMonthYear),'#,##0')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, if one of the InvoiceMonthYear values has no data in it (grayed out), how do I include those non-existent months?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example, if I have selected 6 months, with a total quantity of 60,000, I want to display the result of 10,000 per month.&amp;nbsp; But only 2 of those months have data, so I'm getting 30,000.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm using MonthYear because the time frame may span more than a single year.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;Rick&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 15 Oct 2015 14:09:05 GMT</pubDate>
    <dc:creator>cranium144</dc:creator>
    <dc:date>2015-10-15T14:09:05Z</dc:date>
    <item>
      <title>How to Count a Dimension with no Data</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-Count-a-Dimension-with-no-Data/m-p/988065#M961446</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm looking to calculate the quantity sold per year, which is fairly easy.&amp;nbsp; My statement is this:&lt;/P&gt;&lt;P&gt;=num(sum([Invoice Qty]) / Count(DISTINCT InvoiceMonthYear),'#,##0')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, if one of the InvoiceMonthYear values has no data in it (grayed out), how do I include those non-existent months?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example, if I have selected 6 months, with a total quantity of 60,000, I want to display the result of 10,000 per month.&amp;nbsp; But only 2 of those months have data, so I'm getting 30,000.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm using MonthYear because the time frame may span more than a single year.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;Rick&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Oct 2015 14:09:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-Count-a-Dimension-with-no-Data/m-p/988065#M961446</guid>
      <dc:creator>cranium144</dc:creator>
      <dc:date>2015-10-15T14:09:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to Count a Dimension with no Data</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-Count-a-Dimension-with-no-Data/m-p/988066#M961447</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Pardon, I typed the first line incorrectly.&amp;nbsp; "quantity sold per month" is what I intended.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Oct 2015 14:12:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-Count-a-Dimension-with-no-Data/m-p/988066#M961447</guid>
      <dc:creator>cranium144</dc:creator>
      <dc:date>2015-10-15T14:12:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to Count a Dimension with no Data</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-Count-a-Dimension-with-no-Data/m-p/988067#M961448</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rick,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;there is a number of ways to solve this issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Based on your description, it sounds like you don't have a Master Calendar in your dataset. This is why only 2 months "have data" when you selected 6 months. If you create a Master Calendar and list ALL the dates (months) in your date range, then you'd always have all the months in the range available, whether they have sales or not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Without a master calendar, you might solve the problem by calculating the difference between the Max month and the Min month in the available range. However, this would only work if you are sure that the first selected month and the last selected month have data. Otherwise, you still won't get the desired result. So, back to the master calendar.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. Depending on your data, you may get by with the functions like &lt;STRONG&gt;GetSelectedCount&lt;/STRONG&gt; or &lt;STRONG&gt;GetPossibleCount&lt;/STRONG&gt;. However, based on your description of the problem, you'll probably face the same issue - your selections are made on the fields Year and Month (I'm guessing) while your possible values are affected by the transactional data. So, once again - Master Calendar is your best friend here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cheers,&lt;/P&gt;&lt;P&gt;Oleg Troyansky&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.amazon.com/gp/product/1118949552/ref=as_li_tl?ie=UTF8&amp;amp;camp=1789&amp;amp;creative=9325&amp;amp;creativeASIN=1118949552&amp;amp;linkCode=as2&amp;amp;tag=natursyner0f-20&amp;amp;linkId=HEF4KYLLE22XIQH2"&gt;QlikView Your Business: An expert guide to Business Discovery with QlikView and Qlik Sense&lt;/A&gt;&lt;IMG alt="" border="0" height="1" src="http://ir-na.amazon-adsystem.com/e/ir?t=natursyner0f-20&amp;amp;l=as2&amp;amp;o=1&amp;amp;a=1118949552" style="border: none !important; margin: 0px !important;" width="1" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Oct 2015 14:18:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-Count-a-Dimension-with-no-Data/m-p/988067#M961448</guid>
      <dc:creator>Oleg_Troyansky</dc:creator>
      <dc:date>2015-10-15T14:18:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to Count a Dimension with no Data</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-Count-a-Dimension-with-no-Data/m-p/988068#M961449</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/102121_Capture.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this way?&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Oct 2015 14:22:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-Count-a-Dimension-with-no-Data/m-p/988068#M961449</guid>
      <dc:creator>Qrishna</dc:creator>
      <dc:date>2015-10-15T14:22:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to Count a Dimension with no Data</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-Count-a-Dimension-with-no-Data/m-p/988069#M961450</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I like this look.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, how did you manipulate the data to have a zero?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Oct 2015 14:43:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-Count-a-Dimension-with-no-Data/m-p/988069#M961450</guid>
      <dc:creator>cranium144</dc:creator>
      <dc:date>2015-10-15T14:43:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to Count a Dimension with no Data</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-Count-a-Dimension-with-no-Data/m-p/988070#M961451</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Understood about the Master Calendar.&amp;nbsp; However, w&lt;SPAN style="font-size: 13.3333px;"&gt;e stayed away from the master calendar because we have some "open" orders out to the year 2049.&amp;nbsp; I don't want to slam the year selection full of blank years and months.&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;We have one big facts table with invoices and open orders so I can have 1 field for both invoices and open orders (and customer names, ship to names, etc.).&amp;nbsp; I just have a hidden selection depending on the tab.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Oct 2015 14:45:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-Count-a-Dimension-with-no-Data/m-p/988070#M961451</guid>
      <dc:creator>cranium144</dc:creator>
      <dc:date>2015-10-15T14:45:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to Count a Dimension with no Data</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-Count-a-Dimension-with-no-Data/m-p/988071#M961452</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;See attached.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Oct 2015 14:47:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-Count-a-Dimension-with-no-Data/m-p/988071#M961452</guid>
      <dc:creator>Qrishna</dc:creator>
      <dc:date>2015-10-15T14:47:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to Count a Dimension with no Data</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-Count-a-Dimension-with-no-Data/m-p/988072#M961453</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Any Luck? Did my solution work for you?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Oct 2015 14:59:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-Count-a-Dimension-with-no-Data/m-p/988072#M961453</guid>
      <dc:creator>Qrishna</dc:creator>
      <dc:date>2015-10-16T14:59:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to Count a Dimension with no Data</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-Count-a-Dimension-with-no-Data/m-p/988073#M961454</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For now, I've decided to not change anything.&amp;nbsp; Adding "zero" values would get rid of the green/white/gray model that Qlik is founded on.&amp;nbsp; But I will mark it as a possible answer.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Oct 2015 15:21:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-Count-a-Dimension-with-no-Data/m-p/988073#M961454</guid>
      <dc:creator>cranium144</dc:creator>
      <dc:date>2015-10-16T15:21:15Z</dc:date>
    </item>
  </channel>
</rss>

