<?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 a field using another field distinct in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/count-a-field-using-another-field-distinct/m-p/421290#M156910</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for all you help it is really appriciated but I solved it by creating a new field and counting this field distinct.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;MT&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 20 Sep 2012 07:48:04 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-09-20T07:48:04Z</dc:date>
    <item>
      <title>count a field using another field distinct</title>
      <link>https://community.qlik.com/t5/QlikView/count-a-field-using-another-field-distinct/m-p/421279#M156899</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;I want to count my bill number on distinct date. how can I do this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;MT&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Sep 2012 08:11:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/count-a-field-using-another-field-distinct/m-p/421279#M156899</guid>
      <dc:creator />
      <dc:date>2012-09-19T08:11:55Z</dc:date>
    </item>
    <item>
      <title>Re: count a field using another field distinct</title>
      <link>https://community.qlik.com/t5/QlikView/count-a-field-using-another-field-distinct/m-p/421280#M156900</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not sure if I understand your request properly, but maybe&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;=count( aggr( [bill number], date))&lt;/EM&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;Or could you post some lines of sample date together with your expected outcome?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Sep 2012 09:26:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/count-a-field-using-another-field-distinct/m-p/421280#M156900</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-09-19T09:26:21Z</dc:date>
    </item>
    <item>
      <title>Re: count a field using another field distinct</title>
      <link>https://community.qlik.com/t5/QlikView/count-a-field-using-another-field-distinct/m-p/421281#M156901</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ok my data looks like this,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Date, BillNr, Store, Product, Price&lt;/P&gt;&lt;P&gt;01.01.2011, 6, 730, 124, 120&lt;/P&gt;&lt;P&gt;01.01.2011, 6, 730, 258, 159&lt;/P&gt;&lt;P&gt;05.01.2011, 6, 730, 456, 250&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so the count should be 1 for the BillNr 6 on 01.01.2011 in Store 730&lt;/P&gt;&lt;P&gt;and count should be 1 for the BillNr 6 on 05.01.2011 in Store 730&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does this make my problem more understandable?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;MT&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Sep 2012 09:30:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/count-a-field-using-another-field-distinct/m-p/421281#M156901</guid>
      <dc:creator />
      <dc:date>2012-09-19T09:30:52Z</dc:date>
    </item>
    <item>
      <title>Re: count a field using another field distinct</title>
      <link>https://community.qlik.com/t5/QlikView/count-a-field-using-another-field-distinct/m-p/421282#M156902</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok, the solution will also depend on where / in which context you want to calculate your result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example, if you are using a straight table with dimensions, &lt;EM&gt;BillNr, Store, Date&lt;/EM&gt;, an expression like &lt;EM&gt;count( distinct BillNr) &lt;/EM&gt;should be enough.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can also extend my above suggestion to include store number:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;=count( aggr( BillNr, Store, Date))&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use this expression in a straigt table or in a text box.&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>Wed, 19 Sep 2012 09:38:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/count-a-field-using-another-field-distinct/m-p/421282#M156902</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-09-19T09:38:53Z</dc:date>
    </item>
    <item>
      <title>Re: count a field using another field distinct</title>
      <link>https://community.qlik.com/t5/QlikView/count-a-field-using-another-field-distinct/m-p/421283#M156903</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;you answer was helpfull but the count is still a little bit too high. I have more Bills then I actually have. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;MT&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Sep 2012 09:55:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/count-a-field-using-another-field-distinct/m-p/421283#M156903</guid>
      <dc:creator />
      <dc:date>2012-09-19T09:55:34Z</dc:date>
    </item>
    <item>
      <title>Re: count a field using another field distinct</title>
      <link>https://community.qlik.com/t5/QlikView/count-a-field-using-another-field-distinct/m-p/421284#M156904</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ok,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i know why it is too high. I have also a field in my table that has 0 or 1 for maincustomer so how can I do it that i only see the BillNr that was bought form a maincustomer??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;MT&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Sep 2012 10:02:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/count-a-field-using-another-field-distinct/m-p/421284#M156904</guid>
      <dc:creator />
      <dc:date>2012-09-19T10:02:44Z</dc:date>
    </item>
    <item>
      <title>Re: count a field using another field distinct</title>
      <link>https://community.qlik.com/t5/QlikView/count-a-field-using-another-field-distinct/m-p/421285#M156905</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not sure which approach you are following, but you can use a conditional or a set expression to limit your records to maincustomer, maybe like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;=count({&amp;lt;maincustomer = {1}&amp;gt;} aggr( BillNr, Store, Date))&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Sep 2012 10:07:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/count-a-field-using-another-field-distinct/m-p/421285#M156905</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-09-19T10:07:32Z</dc:date>
    </item>
    <item>
      <title>Re: count a field using another field distinct</title>
      <link>https://community.qlik.com/t5/QlikView/count-a-field-using-another-field-distinct/m-p/421286#M156906</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ok I just don't know how to get the right result. ok I have a straight table and the dimension is store. if I use count(aggr(Date, BillNr)) -&amp;gt; no result (QV cant do it)&lt;/P&gt;&lt;P&gt;count(aggr(BillNr, Date)) -&amp;gt; weird result&lt;/P&gt;&lt;P&gt;count(aggr(store,BillNr, date)) -&amp;gt; better result but still wrong&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I dont know what to do anymore! Does anyone have an idea what I'm doing wrong?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;MT&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Sep 2012 11:22:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/count-a-field-using-another-field-distinct/m-p/421286#M156906</guid>
      <dc:creator />
      <dc:date>2012-09-19T11:22:16Z</dc:date>
    </item>
    <item>
      <title>Re: count a field using another field distinct</title>
      <link>https://community.qlik.com/t5/QlikView/count-a-field-using-another-field-distinct/m-p/421287#M156907</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;order of arguments to aggr() function is important, first is aggr() expression, then following aggr dimensions.&lt;/P&gt;&lt;P&gt;Since you want to count BillNr, I assume you need &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;=count(aggr(BillNr, Store, Date)) &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;to count distinct BillNr per Store and Date&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Sep 2012 11:56:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/count-a-field-using-another-field-distinct/m-p/421287#M156907</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-09-19T11:56:09Z</dc:date>
    </item>
    <item>
      <title>Re: count a field using another field distinct</title>
      <link>https://community.qlik.com/t5/QlikView/count-a-field-using-another-field-distinct/m-p/421288#M156908</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It always returns 0. I really dont understand it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Sep 2012 11:59:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/count-a-field-using-another-field-distinct/m-p/421288#M156908</guid>
      <dc:creator />
      <dc:date>2012-09-19T11:59:39Z</dc:date>
    </item>
    <item>
      <title>Re: count a field using another field distinct</title>
      <link>https://community.qlik.com/t5/QlikView/count-a-field-using-another-field-distinct/m-p/421289#M156909</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check that all field names are spelled correctly, QV is case sensitive with field names.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you upload a small sample file?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Sep 2012 12:06:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/count-a-field-using-another-field-distinct/m-p/421289#M156909</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-09-19T12:06:38Z</dc:date>
    </item>
    <item>
      <title>Re: count a field using another field distinct</title>
      <link>https://community.qlik.com/t5/QlikView/count-a-field-using-another-field-distinct/m-p/421290#M156910</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for all you help it is really appriciated but I solved it by creating a new field and counting this field distinct.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;MT&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Sep 2012 07:48:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/count-a-field-using-another-field-distinct/m-p/421290#M156910</guid>
      <dc:creator />
      <dc:date>2012-09-20T07:48:04Z</dc:date>
    </item>
  </channel>
</rss>

