<?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: Count values based on other columns too in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Count-values-based-on-other-columns-too/m-p/259001#M1181961</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Mark,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have an another issue in an another table:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After I have the number of batches calculated for every month I need to calculate the labor costs per batch.&lt;/P&gt;&lt;P&gt;For this I need to devide the labor costs for one month to the number of batches.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; The problem&amp;nbsp; is that when I select a product, the labor costs are devided with the number of batces of the selected product. For example if I have 10 batches in one month but I selected a product that was produced only one batch that month, the labor costs are devided only to one.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The solution would be a formula that is not influenced by selections, I need the total number of batches per month no matter what selections occur.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you help me out with this one too?&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Nandor&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 18 Jan 2012 20:04:50 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-01-18T20:04:50Z</dc:date>
    <item>
      <title>Count values based on other columns too</title>
      <link>https://community.qlik.com/t5/QlikView/Count-values-based-on-other-columns-too/m-p/258995#M1181955</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a list like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 400px;"&gt;&lt;TBODY&gt;&lt;TR style="height: 15pt;"&gt;&lt;TD height="20" style="height: 15pt; width: 71pt;" width="94"&gt;Product name&lt;/TD&gt;&lt;TD style="width: 94pt;" width="125"&gt;raw material name&lt;/TD&gt;&lt;TD style="width: 136pt;" width="181"&gt;Final product batch number&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 15pt;"&gt;&lt;TD height="20" style="height: 15pt;"&gt;Product 1&lt;/TD&gt;&lt;TD&gt;Raw material 1&lt;/TD&gt;&lt;TD align="right"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 15pt;"&gt;&lt;TD height="20" style="height: 15pt;"&gt;Product 1&lt;/TD&gt;&lt;TD&gt;Raw material 2&lt;/TD&gt;&lt;TD align="right"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 15pt;"&gt;&lt;TD height="20" style="height: 15pt;"&gt;Product 1&lt;/TD&gt;&lt;TD&gt;Raw material 3&lt;/TD&gt;&lt;TD align="right"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 15pt;"&gt;&lt;TD height="20" style="height: 15pt;"&gt;Product 2&lt;/TD&gt;&lt;TD&gt;Raw material 1&lt;/TD&gt;&lt;TD align="right"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 15pt;"&gt;&lt;TD height="20" style="height: 15pt;"&gt;Product 2&lt;/TD&gt;&lt;TD&gt;Raw material 2&lt;/TD&gt;&lt;TD align="right"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 15pt;"&gt;&lt;TD height="20" style="height: 15pt;"&gt;Product 2&lt;/TD&gt;&lt;TD&gt;Raw material 3&lt;/TD&gt;&lt;TD align="right"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 15pt;"&gt;&lt;TD height="20" style="height: 15pt;"&gt;Product 2&lt;/TD&gt;&lt;TD&gt;Raw material 4&lt;/TD&gt;&lt;TD align="right"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 15pt;"&gt;&lt;TD height="20" style="height: 15pt;"&gt;Product 2&lt;/TD&gt;&lt;TD&gt;Raw material 5&lt;/TD&gt;&lt;TD align="right"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 15pt;"&gt;&lt;TD height="20" style="height: 15pt;"&gt;Product 3&lt;/TD&gt;&lt;TD&gt;Raw material 1&lt;/TD&gt;&lt;TD align="right"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 15pt;"&gt;&lt;TD height="20" style="height: 15pt;"&gt;Product 3&lt;/TD&gt;&lt;TD&gt;Raw material 2&lt;/TD&gt;&lt;TD align="right"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 15pt;"&gt;&lt;TD height="20" style="height: 15pt;"&gt;Product 3&lt;/TD&gt;&lt;TD&gt;Raw material 3&lt;/TD&gt;&lt;TD align="right"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I use Count (DISTINCT [Final product batch number]), the function will return 1.&lt;/P&gt;&lt;P&gt;If I use Count ([Final product batch number]), the function returnes 11.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The corect answer would be 3, because batch 1 is the batch number of the Product, the raw materials were marked with batch 1 just to group it to the coresponding final product batch.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; We have 3 final products with the same batch number, I would need to count them, for every month.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help me to count the batches taking in consideration the Product name too.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Nandi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 08 Jan 2012 21:45:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-values-based-on-other-columns-too/m-p/258995#M1181955</guid>
      <dc:creator />
      <dc:date>2012-01-08T21:45:03Z</dc:date>
    </item>
    <item>
      <title>Count values based on other columns too</title>
      <link>https://community.qlik.com/t5/QlikView/Count-values-based-on-other-columns-too/m-p/258996#M1181956</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe I haven't fully understood your requirement, but I think it can be done similar to&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=sum( aggr(count(DISTINCT [Final product batch number]), [Product name]))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your case seems to be quite special with all batch numbers equal zero, if above expression is not what you are looking for, I think we can improve on that quite easily with a bit more information.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 08 Jan 2012 22:33:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-values-based-on-other-columns-too/m-p/258996#M1181956</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-01-08T22:33:06Z</dc:date>
    </item>
    <item>
      <title>Count values based on other columns too</title>
      <link>https://community.qlik.com/t5/QlikView/Count-values-based-on-other-columns-too/m-p/258997#M1181957</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Stefan, this is the formula I needed.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jan 2012 21:00:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-values-based-on-other-columns-too/m-p/258997#M1181957</guid>
      <dc:creator />
      <dc:date>2012-01-17T21:00:23Z</dc:date>
    </item>
    <item>
      <title>Re: Count values based on other columns too</title>
      <link>https://community.qlik.com/t5/QlikView/Count-values-based-on-other-columns-too/m-p/258998#M1181958</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Mark, I just realised that the formula is not working if the month is added.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I attached to this post the excell file and the QlikView file too. I have a free version, I hope you will be able to open it.&lt;/P&gt;&lt;P&gt; I will also post a copy of the table that is in the excel file on this post.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to have a dig down barchart, from year to month and than to see the number of batches for the products in any month I choose.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Nandor&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" width="528"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl65" height="20" width="64"&gt;Year&lt;/TD&gt;&lt;TD class="xl65" style="border-left: medium none;" width="64"&gt;Month&lt;/TD&gt;&lt;TD class="xl65" style="border-left: medium none;" width="94"&gt;Product name&lt;/TD&gt;&lt;TD class="xl65" style="border-left: medium none;" width="125"&gt;raw material&amp;nbsp; name&lt;/TD&gt;&lt;TD class="xl65" style="border-left: medium none;" width="181"&gt;Final product&amp;nbsp; batch number&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="20" style="border-top: medium none;"&gt;2012&lt;/TD&gt;&lt;TD class="xl65" style="border-top: medium none; border-left: medium none;"&gt;1&lt;/TD&gt;&lt;TD class="xl65" style="border-top: medium none; border-left: medium none;"&gt;Product 1&lt;/TD&gt;&lt;TD class="xl65" style="border-top: medium none; border-left: medium none;"&gt;Raw material 1&lt;/TD&gt;&lt;TD class="xl65" style="border-top: medium none; border-left: medium none;"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="20" style="border-top: medium none;"&gt;2012&lt;/TD&gt;&lt;TD class="xl65" style="border-top: medium none; border-left: medium none;"&gt;1&lt;/TD&gt;&lt;TD class="xl65" style="border-top: medium none; border-left: medium none;"&gt;Product 1&lt;/TD&gt;&lt;TD class="xl65" style="border-top: medium none; border-left: medium none;"&gt;Raw material 2&lt;/TD&gt;&lt;TD class="xl65" style="border-top: medium none; border-left: medium none;"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="20" style="border-top: medium none;"&gt;2012&lt;/TD&gt;&lt;TD class="xl65" style="border-top: medium none; border-left: medium none;"&gt;1&lt;/TD&gt;&lt;TD class="xl65" style="border-top: medium none; border-left: medium none;"&gt;Product 1&lt;/TD&gt;&lt;TD class="xl65" style="border-top: medium none; border-left: medium none;"&gt;Raw material 3&lt;/TD&gt;&lt;TD class="xl65" style="border-top: medium none; border-left: medium none;"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="20" style="border-top: medium none;"&gt;2012&lt;/TD&gt;&lt;TD class="xl65" style="border-top: medium none; border-left: medium none;"&gt;1&lt;/TD&gt;&lt;TD class="xl65" style="border-top: medium none; border-left: medium none;"&gt;Product 1&lt;/TD&gt;&lt;TD class="xl65" style="border-top: medium none; border-left: medium none;"&gt;Raw material 1&lt;/TD&gt;&lt;TD class="xl65" style="border-top: medium none; border-left: medium none;"&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="20" style="border-top: medium none;"&gt;2012&lt;/TD&gt;&lt;TD class="xl65" style="border-top: medium none; border-left: medium none;"&gt;1&lt;/TD&gt;&lt;TD class="xl65" style="border-top: medium none; border-left: medium none;"&gt;Product 1&lt;/TD&gt;&lt;TD class="xl65" style="border-top: medium none; border-left: medium none;"&gt;Raw material 2&lt;/TD&gt;&lt;TD class="xl65" style="border-top: medium none; border-left: medium none;"&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="20" style="border-top: medium none;"&gt;2012&lt;/TD&gt;&lt;TD class="xl65" style="border-top: medium none; border-left: medium none;"&gt;1&lt;/TD&gt;&lt;TD class="xl65" style="border-top: medium none; border-left: medium none;"&gt;Product 1&lt;/TD&gt;&lt;TD class="xl65" style="border-top: medium none; border-left: medium none;"&gt;Raw material 3&lt;/TD&gt;&lt;TD class="xl65" style="border-top: medium none; border-left: medium none;"&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="20" style="border-top: medium none;"&gt;2011&lt;/TD&gt;&lt;TD class="xl65" style="border-top: medium none; border-left: medium none;"&gt;1&lt;/TD&gt;&lt;TD class="xl65" style="border-top: medium none; border-left: medium none;"&gt;Product 1&lt;/TD&gt;&lt;TD class="xl65" style="border-top: medium none; border-left: medium none;"&gt;Raw material 1&lt;/TD&gt;&lt;TD class="xl65" style="border-top: medium none; border-left: medium none;"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="20" style="border-top: medium none;"&gt;2011&lt;/TD&gt;&lt;TD class="xl65" style="border-top: medium none; border-left: medium none;"&gt;1&lt;/TD&gt;&lt;TD class="xl65" style="border-top: medium none; border-left: medium none;"&gt;Product 1&lt;/TD&gt;&lt;TD class="xl65" style="border-top: medium none; border-left: medium none;"&gt;Raw material 2&lt;/TD&gt;&lt;TD class="xl65" style="border-top: medium none; border-left: medium none;"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="20" style="border-top: medium none;"&gt;2011&lt;/TD&gt;&lt;TD class="xl65" style="border-top: medium none; border-left: medium none;"&gt;1&lt;/TD&gt;&lt;TD class="xl65" style="border-top: medium none; border-left: medium none;"&gt;Product 1&lt;/TD&gt;&lt;TD class="xl65" style="border-top: medium none; border-left: medium none;"&gt;Raw material 3&lt;/TD&gt;&lt;TD class="xl65" style="border-top: medium none; border-left: medium none;"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="20" style="border-top: medium none;"&gt;2011&lt;/TD&gt;&lt;TD class="xl65" style="border-top: medium none; border-left: medium none;"&gt;1&lt;/TD&gt;&lt;TD class="xl65" style="border-top: medium none; border-left: medium none;"&gt;Product 1&lt;/TD&gt;&lt;TD class="xl65" style="border-top: medium none; border-left: medium none;"&gt;Raw material 1&lt;/TD&gt;&lt;TD class="xl65" style="border-top: medium none; border-left: medium none;"&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="20" style="border-top: medium none;"&gt;2011&lt;/TD&gt;&lt;TD class="xl65" style="border-top: medium none; border-left: medium none;"&gt;1&lt;/TD&gt;&lt;TD class="xl65" style="border-top: medium none; border-left: medium none;"&gt;Product 1&lt;/TD&gt;&lt;TD class="xl65" style="border-top: medium none; border-left: medium none;"&gt;Raw material 2&lt;/TD&gt;&lt;TD class="xl65" style="border-top: medium none; border-left: medium none;"&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="20" style="border-top: medium none;"&gt;2011&lt;/TD&gt;&lt;TD class="xl65" style="border-top: medium none; border-left: medium none;"&gt;1&lt;/TD&gt;&lt;TD class="xl65" style="border-top: medium none; border-left: medium none;"&gt;Product 1&lt;/TD&gt;&lt;TD class="xl65" style="border-top: medium none; border-left: medium none;"&gt;Raw material 3&lt;/TD&gt;&lt;TD class="xl65" style="border-top: medium none; border-left: medium none;"&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="20" style="border-top: medium none;"&gt;2011&lt;/TD&gt;&lt;TD class="xl65" style="border-top: medium none; border-left: medium none;"&gt;2&lt;/TD&gt;&lt;TD class="xl65" style="border-top: medium none; border-left: medium none;"&gt;Product 1&lt;/TD&gt;&lt;TD class="xl65" style="border-top: medium none; border-left: medium none;"&gt;Raw material 1&lt;/TD&gt;&lt;TD class="xl65" style="border-top: medium none; border-left: medium none;"&gt;3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="20" style="border-top: medium none;"&gt;2011&lt;/TD&gt;&lt;TD class="xl65" style="border-top: medium none; border-left: medium none;"&gt;2&lt;/TD&gt;&lt;TD class="xl65" style="border-top: medium none; border-left: medium none;"&gt;Product 1&lt;/TD&gt;&lt;TD class="xl65" style="border-top: medium none; border-left: medium none;"&gt;Raw material 2&lt;/TD&gt;&lt;TD class="xl65" style="border-top: medium none; border-left: medium none;"&gt;3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="20" style="border-top: medium none;"&gt;2011&lt;/TD&gt;&lt;TD class="xl65" style="border-top: medium none; border-left: medium none;"&gt;2&lt;/TD&gt;&lt;TD class="xl65" style="border-top: medium none; border-left: medium none;"&gt;Product 1&lt;/TD&gt;&lt;TD class="xl65" style="border-top: medium none; border-left: medium none;"&gt;Raw material 3&lt;/TD&gt;&lt;TD class="xl65" style="border-top: medium none; border-left: medium none;"&gt;3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="20" style="border-top: medium none;"&gt;2011&lt;/TD&gt;&lt;TD class="xl65" style="border-top: medium none; border-left: medium none;"&gt;2&lt;/TD&gt;&lt;TD class="xl65" style="border-top: medium none; border-left: medium none;"&gt;Product 2&lt;/TD&gt;&lt;TD class="xl65" style="border-top: medium none; border-left: medium none;"&gt;Raw material 1&lt;/TD&gt;&lt;TD class="xl65" style="border-top: medium none; border-left: medium none;"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="20" style="border-top: medium none;"&gt;2011&lt;/TD&gt;&lt;TD class="xl65" style="border-top: medium none; border-left: medium none;"&gt;2&lt;/TD&gt;&lt;TD class="xl65" style="border-top: medium none; border-left: medium none;"&gt;Product 2&lt;/TD&gt;&lt;TD class="xl65" style="border-top: medium none; border-left: medium none;"&gt;Raw material 2&lt;/TD&gt;&lt;TD class="xl65" style="border-top: medium none; border-left: medium none;"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="20" style="border-top: medium none;"&gt;2011&lt;/TD&gt;&lt;TD class="xl65" style="border-top: medium none; border-left: medium none;"&gt;2&lt;/TD&gt;&lt;TD class="xl65" style="border-top: medium none; border-left: medium none;"&gt;Product 2&lt;/TD&gt;&lt;TD class="xl65" style="border-top: medium none; border-left: medium none;"&gt;Raw material 3&lt;/TD&gt;&lt;TD class="xl65" style="border-top: medium none; border-left: medium none;"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="20" style="border-top: medium none;"&gt;2011&lt;/TD&gt;&lt;TD class="xl65" style="border-top: medium none; border-left: medium none;"&gt;2&lt;/TD&gt;&lt;TD class="xl65" style="border-top: medium none; border-left: medium none;"&gt;Product 2&lt;/TD&gt;&lt;TD class="xl65" style="border-top: medium none; border-left: medium none;"&gt;Raw material 4&lt;/TD&gt;&lt;TD class="xl65" style="border-top: medium none; border-left: medium none;"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="20" style="border-top: medium none;"&gt;2011&lt;/TD&gt;&lt;TD class="xl65" style="border-top: medium none; border-left: medium none;"&gt;2&lt;/TD&gt;&lt;TD class="xl65" style="border-top: medium none; border-left: medium none;"&gt;Product 2&lt;/TD&gt;&lt;TD class="xl65" style="border-top: medium none; border-left: medium none;"&gt;Raw material 5&lt;/TD&gt;&lt;TD class="xl65" style="border-top: medium none; border-left: medium none;"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="20" style="border-top: medium none;"&gt;2011&lt;/TD&gt;&lt;TD class="xl65" style="border-top: medium none; border-left: medium none;"&gt;4&lt;/TD&gt;&lt;TD class="xl65" style="border-top: medium none; border-left: medium none;"&gt;Product 3&lt;/TD&gt;&lt;TD class="xl65" style="border-top: medium none; border-left: medium none;"&gt;Raw material 1&lt;/TD&gt;&lt;TD class="xl65" style="border-top: medium none; border-left: medium none;"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="20" style="border-top: medium none;"&gt;2011&lt;/TD&gt;&lt;TD class="xl65" style="border-top: medium none; border-left: medium none;"&gt;4&lt;/TD&gt;&lt;TD class="xl65" style="border-top: medium none; border-left: medium none;"&gt;Product 3&lt;/TD&gt;&lt;TD class="xl65" style="border-top: medium none; border-left: medium none;"&gt;Raw material 2&lt;/TD&gt;&lt;TD class="xl65" style="border-top: medium none; border-left: medium none;"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="20" style="border-top: medium none;"&gt;2011&lt;/TD&gt;&lt;TD class="xl65" style="border-top: medium none; border-left: medium none;"&gt;4&lt;/TD&gt;&lt;TD class="xl65" style="border-top: medium none; border-left: medium none;"&gt;Product 3&lt;/TD&gt;&lt;TD class="xl65" style="border-top: medium none; border-left: medium none;"&gt;Raw material 3&lt;/TD&gt;&lt;TD class="xl65" style="border-top: medium none; border-left: medium none;"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="20" style="border-top: medium none;"&gt;2011&lt;/TD&gt;&lt;TD class="xl65" style="border-top: medium none; border-left: medium none;"&gt;5&lt;/TD&gt;&lt;TD class="xl65" style="border-top: medium none; border-left: medium none;"&gt;Product 3&lt;/TD&gt;&lt;TD class="xl65" style="border-top: medium none; border-left: medium none;"&gt;Raw material 1&lt;/TD&gt;&lt;TD class="xl65" style="border-top: medium none; border-left: medium none;"&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="20" style="border-top: medium none;"&gt;2011&lt;/TD&gt;&lt;TD class="xl65" style="border-top: medium none; border-left: medium none;"&gt;5&lt;/TD&gt;&lt;TD class="xl65" style="border-top: medium none; border-left: medium none;"&gt;Product 3&lt;/TD&gt;&lt;TD class="xl65" style="border-top: medium none; border-left: medium none;"&gt;Raw material 2&lt;/TD&gt;&lt;TD class="xl65" style="border-top: medium none; border-left: medium none;"&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="20" style="border-top: medium none;"&gt;2011&lt;/TD&gt;&lt;TD class="xl65" style="border-top: medium none; border-left: medium none;"&gt;5&lt;/TD&gt;&lt;TD class="xl65" style="border-top: medium none; border-left: medium none;"&gt;Product 3&lt;/TD&gt;&lt;TD class="xl65" style="border-top: medium none; border-left: medium none;"&gt;Raw material 3&lt;/TD&gt;&lt;TD class="xl65" style="border-top: medium none; border-left: medium none;"&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jan 2012 21:19:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-values-based-on-other-columns-too/m-p/258998#M1181958</guid>
      <dc:creator />
      <dc:date>2012-01-17T21:19:07Z</dc:date>
    </item>
    <item>
      <title>Count values based on other columns too</title>
      <link>https://community.qlik.com/t5/QlikView/Count-values-based-on-other-columns-too/m-p/258999#M1181959</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am bit unsure how you want to count the batch numbers in the case of aggregated dimensions, like Month --&amp;gt; Year.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe your solution is quite near, you could try just adding your dimensions to the aggr() function dimension list:&lt;/P&gt;&lt;P&gt;=sum( aggr(count(DISTINCT [Final product batch number]), Year, Month, [Product name]))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If this is not what you want, please give an example of your expected result per dimension / level of drill down hierarchie and please describe once more how you derive your results from the source table.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jan 2012 22:24:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-values-based-on-other-columns-too/m-p/258999#M1181959</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-01-17T22:24:54Z</dc:date>
    </item>
    <item>
      <title>Re: Count values based on other columns too</title>
      <link>https://community.qlik.com/t5/QlikView/Count-values-based-on-other-columns-too/m-p/259000#M1181960</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Mark, it is working perfectly. It does everithing I needed. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you again,&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Nandor&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jan 2012 19:34:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-values-based-on-other-columns-too/m-p/259000#M1181960</guid>
      <dc:creator />
      <dc:date>2012-01-18T19:34:41Z</dc:date>
    </item>
    <item>
      <title>Re: Count values based on other columns too</title>
      <link>https://community.qlik.com/t5/QlikView/Count-values-based-on-other-columns-too/m-p/259001#M1181961</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Mark,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have an another issue in an another table:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After I have the number of batches calculated for every month I need to calculate the labor costs per batch.&lt;/P&gt;&lt;P&gt;For this I need to devide the labor costs for one month to the number of batches.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; The problem&amp;nbsp; is that when I select a product, the labor costs are devided with the number of batces of the selected product. For example if I have 10 batches in one month but I selected a product that was produced only one batch that month, the labor costs are devided only to one.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The solution would be a formula that is not influenced by selections, I need the total number of batches per month no matter what selections occur.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you help me out with this one too?&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Nandor&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jan 2012 20:04:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-values-based-on-other-columns-too/m-p/259001#M1181961</guid>
      <dc:creator />
      <dc:date>2012-01-18T20:04:50Z</dc:date>
    </item>
    <item>
      <title>Count values based on other columns too</title>
      <link>https://community.qlik.com/t5/QlikView/Count-values-based-on-other-columns-too/m-p/259002#M1181962</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you want an aggregation that is not influenced by selection, use e.g.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;count({1} [Final product batch number])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;{1} is a set expression, if you are not familiar with that, please start with the Help page. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jan 2012 20:52:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-values-based-on-other-columns-too/m-p/259002#M1181962</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-01-18T20:52:19Z</dc:date>
    </item>
    <item>
      <title>Re: Count values based on other columns too</title>
      <link>https://community.qlik.com/t5/QlikView/Count-values-based-on-other-columns-too/m-p/1596393#M1181963</link>
      <description>&lt;P&gt;Hi Stephan,&lt;BR /&gt;I had a similar issue. So I have two columns, PART AND CUBES, with one to many relationship.(one PART can have many CUBES or a PART can have no CUBE).&lt;BR /&gt;Scenario: If I select 3 PARTS which have 2 CUBES, wherein 2 PARTS have 2 CUBES and 1 PART has no CUBE. I want a count of all the CUBES plus any PART which has no CUBES.&lt;BR /&gt;So the count should be 2+1=3.&lt;BR /&gt;How can I implement this?&lt;BR /&gt;&lt;BR /&gt;I tried count(PART) + count(if(IsNull(CUBE),count(PART),0)) , but it didn't work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/22245"&gt;@swuehl&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Regards,&lt;BR /&gt;Abhishek&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jun 2019 16:16:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-values-based-on-other-columns-too/m-p/1596393#M1181963</guid>
      <dc:creator>abhi1693r</dc:creator>
      <dc:date>2019-06-26T16:16:26Z</dc:date>
    </item>
    <item>
      <title>Re: Count values based on other columns too</title>
      <link>https://community.qlik.com/t5/QlikView/Count-values-based-on-other-columns-too/m-p/1658792#M1181964</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have the situation similar to the original posting and the following expression help to count correctly.&lt;/P&gt;&lt;P&gt;=sum( aggr(count(DISTINCT [Final product batch number]), Year, Month, [Product name]))&lt;/P&gt;&lt;P&gt;Could someone help to explain how the logic works here?&lt;/P&gt;&lt;P&gt;I would also like to have the count of the [Raw material] with certain [Final product batch number] in the most recent month, by&amp;nbsp;[Product name].&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, If the&amp;nbsp;[Final product batch number] desired is 1, the result for Product 1 should be 3, as the most recent month is 2012+01, and there are 3 counts of Raw material with the batch number = 1.&amp;nbsp;&lt;/P&gt;&lt;P&gt;How should the expression be modified to count this? (I know it should be Max(YearMonth) or something like it. I just can't figure out the correct syntax, probably due my lack of understanding on how the original expression works.)&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ernest&lt;/P&gt;</description>
      <pubDate>Wed, 18 Dec 2019 05:59:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-values-based-on-other-columns-too/m-p/1658792#M1181964</guid>
      <dc:creator>A7R3</dc:creator>
      <dc:date>2019-12-18T05:59:02Z</dc:date>
    </item>
  </channel>
</rss>

