<?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: Problem with COUNT in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Problem-with-COUNT/m-p/471619#M1156410</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your response. But what is the expression supposed to be then? Just count(CalendarDate) or count(CalendarWeekDay) doesnt work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or is there something else what i must do?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 30 Jan 2013 13:59:01 GMT</pubDate>
    <dc:creator />
    <dc:date>2013-01-30T13:59:01Z</dc:date>
    <item>
      <title>Problem with COUNT</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-COUNT/m-p/471614#M1156405</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Im having a problem related to this topic: &lt;A href="http://www.qlikcommunity.com/thread/71272?tstart=0"&gt;http://www.qlikcommunity.com/thread/71272?tstart=0&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Im using a master calendar with the date field 'CalendarDate'. Calendardate is linked to the columns DATIZIEK (Day of getting sick) and DATEZIEK(date of getting better, wich are related to ID_ZKT (Also with ID_PER, but let take this one). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If i do the following in my chart for count(CalendarDate) it counts the days an employee was sick. But here is the problem, lets look at the following example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ID_ZKT&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DATIZIEK&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DATEZIEK&lt;/P&gt;&lt;P&gt;1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 10-1-2013&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 15-1-2013&lt;/P&gt;&lt;P&gt;2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 10-1-2013&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 15-1-2013&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When i do count(CalendarDate), selected on the 10-1-2013, its returning the value 4 and not the value 2 what is should be. For some reason it counts for the first ID 2 days for 10-1-2013 and also for the second. If just one ID_ZKT is related to a DATIZIEK and DATEZIEK value or the DATEZIEK value is different, then it returns the right number of days.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Someone an idea how to solve this?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Jan 2013 11:50:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-COUNT/m-p/471614#M1156405</guid>
      <dc:creator />
      <dc:date>2013-01-30T11:50:43Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with COUNT</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-COUNT/m-p/471615#M1156406</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Pz do give a sample!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Jan 2013 12:08:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-COUNT/m-p/471615#M1156406</guid>
      <dc:creator>sujeetsingh</dc:creator>
      <dc:date>2013-01-30T12:08:16Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with COUNT</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-COUNT/m-p/471616#M1156407</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I suspect you have multiple entries in your master calendar. Try loading this with the distinct clause.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If it still doesn't work, an example would be good.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HIC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Jan 2013 13:20:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-COUNT/m-p/471616#M1156407</guid>
      <dc:creator>hic</dc:creator>
      <dc:date>2013-01-30T13:20:35Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with COUNT</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-COUNT/m-p/471617#M1156408</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;Here is an example. I have selected the date 10-1-2013 and as you can see the chart returns the value 4, and not the value 2 (10-1-2013 contains 2 sick days from ID_PER 1 and 2). If the sick and better days of 2 ID_PER are not the same it reurns the right value.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Jan 2013 13:22:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-COUNT/m-p/471617#M1156408</guid>
      <dc:creator />
      <dc:date>2013-01-30T13:22:42Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with COUNT</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-COUNT/m-p/471618#M1156409</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The if-function inside the count causes this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since the Count() depends on two fields, ID_ZKT and CalendarWeekDay, all combinations between these are created.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Further, you have a data model with a synthetic table that potentially can mess things up.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HIC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Jan 2013 13:32:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-COUNT/m-p/471618#M1156409</guid>
      <dc:creator>hic</dc:creator>
      <dc:date>2013-01-30T13:32:59Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with COUNT</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-COUNT/m-p/471619#M1156410</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your response. But what is the expression supposed to be then? Just count(CalendarDate) or count(CalendarWeekDay) doesnt work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or is there something else what i must do?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Jan 2013 13:59:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-COUNT/m-p/471619#M1156410</guid>
      <dc:creator />
      <dc:date>2013-01-30T13:59:01Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with COUNT</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-COUNT/m-p/471620#M1156411</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The joins in the script caused duplicates. As did the intervalmatch. And the if inside the count also caused duplicates. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See attachment for how I would do it. The script is changed so that you no longer have an unnecessary synthetic table. I also simplified it somewhat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HIC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Jan 2013 14:31:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-COUNT/m-p/471620#M1156411</guid>
      <dc:creator>hic</dc:creator>
      <dc:date>2013-01-30T14:31:46Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with COUNT</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-COUNT/m-p/471621#M1156412</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks but im using the personal edition so i cant open the qvw file.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Jan 2013 15:35:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-COUNT/m-p/471621#M1156412</guid>
      <dc:creator />
      <dc:date>2013-01-30T15:35:48Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with COUNT</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-COUNT/m-p/471622#M1156413</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try again. I have replaced the file with one containing an embedded license.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HIC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Jan 2013 16:10:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-COUNT/m-p/471622#M1156413</guid>
      <dc:creator>hic</dc:creator>
      <dc:date>2013-01-30T16:10:33Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with COUNT</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-COUNT/m-p/471623#M1156415</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I got it to work with this expression: &lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;&lt;SPAN style=": ; color: #0000ff; font-size: 8pt;"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;AVG&lt;/P&gt; &lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;aggr&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;count&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;distinct&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[ID_ZKT]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;),&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;CalendarDate&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)) &lt;/SPAN&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the help!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Jan 2013 10:12:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-COUNT/m-p/471623#M1156415</guid>
      <dc:creator />
      <dc:date>2013-01-31T10:12:07Z</dc:date>
    </item>
  </channel>
</rss>

