<?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 Count Distinct Date in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Count-Distinct-Date/m-p/880860#M307370</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;I am using the following formula to count distinct days in my data.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN style="font-style: normal; font-weight: normal;"&gt;Count(Distinct Date)&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;I want my count in the above formula to only change when I make a Year, Month, Quarter, Week etc. selection.&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;Example:&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;Year: Count = 365, Month Jan: Count = 31, Week: Count = 7 and so on.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;I do not these totals want this to change, if I make a selection in a field that is not a related to a date (Example: Customer).&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&amp;nbsp; What &lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;I want is the count to main the full count of days for date timeframe selected.&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;Example: With the above formula, if I select one Month; then select an attribute of another field within my data that only has one date associate with it, formula&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; is only going to equal 1 when I want it to equal the total days in the Month of 31.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;I have tried the following:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P style="font-style: normal; font-weight: normal;"&gt;Count({1}Distinct Date)&amp;nbsp; - This will only maintain the total distinct dates within the entire file.&amp;nbsp; It won’t change when I select Year, Quarter, Month, Week, etc.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;Thanks in advance for your help.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;Brian&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 29 May 2015 16:51:57 GMT</pubDate>
    <dc:creator />
    <dc:date>2015-05-29T16:51:57Z</dc:date>
    <item>
      <title>Count Distinct Date</title>
      <link>https://community.qlik.com/t5/QlikView/Count-Distinct-Date/m-p/880860#M307370</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;I am using the following formula to count distinct days in my data.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN style="font-style: normal; font-weight: normal;"&gt;Count(Distinct Date)&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;I want my count in the above formula to only change when I make a Year, Month, Quarter, Week etc. selection.&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;Example:&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;Year: Count = 365, Month Jan: Count = 31, Week: Count = 7 and so on.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;I do not these totals want this to change, if I make a selection in a field that is not a related to a date (Example: Customer).&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&amp;nbsp; What &lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;I want is the count to main the full count of days for date timeframe selected.&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;Example: With the above formula, if I select one Month; then select an attribute of another field within my data that only has one date associate with it, formula&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; is only going to equal 1 when I want it to equal the total days in the Month of 31.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;I have tried the following:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P style="font-style: normal; font-weight: normal;"&gt;Count({1}Distinct Date)&amp;nbsp; - This will only maintain the total distinct dates within the entire file.&amp;nbsp; It won’t change when I select Year, Quarter, Month, Week, etc.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;Thanks in advance for your help.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;Brian&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 May 2015 16:51:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-Distinct-Date/m-p/880860#M307370</guid>
      <dc:creator />
      <dc:date>2015-05-29T16:51:57Z</dc:date>
    </item>
    <item>
      <title>Re: Count Distinct Date</title>
      <link>https://community.qlik.com/t5/QlikView/Count-Distinct-Date/m-p/880861#M307371</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;COUNT({1&amp;lt;Year = $::Year, Quarter = $::Quarter, Month = $::Month, Week = $::Week&amp;gt;} DISTINCT Date)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 May 2015 16:55:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-Distinct-Date/m-p/880861#M307371</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2015-05-29T16:55:33Z</dc:date>
    </item>
    <item>
      <title>Re: Count Distinct Date</title>
      <link>https://community.qlik.com/t5/QlikView/Count-Distinct-Date/m-p/880862#M307372</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;Count({1&amp;lt;Year = p(Year), Month = p(Month), Week = p(Week), Date = p(Date), MonthYear = p(MonthYear), Quarter = p(Quarter)&amp;gt;}Distinct Date)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Add all your Date related field like the above and it should work the way you want it to work.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;HTH&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Best,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Sunny&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 May 2015 16:56:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-Distinct-Date/m-p/880862#M307372</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-05-29T16:56:06Z</dc:date>
    </item>
    <item>
      <title>Re: Count Distinct Date</title>
      <link>https://community.qlik.com/t5/QlikView/Count-Distinct-Date/m-p/880863#M307373</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This worked.&amp;nbsp; Thanks swuehi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 May 2015 17:05:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-Distinct-Date/m-p/880863#M307373</guid>
      <dc:creator />
      <dc:date>2015-05-29T17:05:27Z</dc:date>
    </item>
    <item>
      <title>Re: Count Distinct Date</title>
      <link>https://community.qlik.com/t5/QlikView/Count-Distinct-Date/m-p/880864#M307374</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi swuehi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The formula you provided works great in a text object but is not working in a Chart Object.&amp;nbsp; The Count is still reflected as the total number of dates associated with each field attribute.&amp;nbsp; Is there an alternative formula that can be used for a Chart Object?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Brian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 May 2015 17:18:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-Distinct-Date/m-p/880864#M307374</guid>
      <dc:creator />
      <dc:date>2015-05-29T17:18:08Z</dc:date>
    </item>
    <item>
      <title>Re: Count Distinct Date</title>
      <link>https://community.qlik.com/t5/QlikView/Count-Distinct-Date/m-p/880865#M307375</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You want it not to be split across dimensions?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try the total qualifier:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px; background-color: #edf8ca;"&gt;COUNT({1&amp;lt;Year = $::Year, Quarter = $::Quarter, Month = $::Month, Week = $::Week&amp;gt;}&amp;nbsp; TOTAL DISTINCT Date)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 May 2015 17:19:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-Distinct-Date/m-p/880865#M307375</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2015-05-29T17:19:38Z</dc:date>
    </item>
    <item>
      <title>Re: Count Distinct Date</title>
      <link>https://community.qlik.com/t5/QlikView/Count-Distinct-Date/m-p/880866#M307376</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In the chart you can use this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;COUNT(&lt;STRONG style="color: #ff0000;"&gt;TOTAL&lt;/STRONG&gt; {1&amp;lt;Year = $::Year, Quarter = $::Quarter, Month = $::Month, Week = $::Week&amp;gt;} DISTINCT Date)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 May 2015 17:20:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-Distinct-Date/m-p/880866#M307376</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-05-29T17:20:37Z</dc:date>
    </item>
    <item>
      <title>Re: Count Distinct Date</title>
      <link>https://community.qlik.com/t5/QlikView/Count-Distinct-Date/m-p/880867#M307377</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;SPAN style="font-size: 13.3333330154419px;"&gt;Are you looking something like below?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="yearmonthday.png" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/87937_yearmonthday.png" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;If Yes, you could use the functions &lt;/P&gt;&lt;P&gt;ex:&lt;/P&gt;&lt;P&gt;floor(YearEnd(SalesDate)-YearStart(SalesDate))&lt;/P&gt;&lt;P&gt;ceil(MonthEnd(SalesDate)-MonthStart(SalesDate))&lt;/P&gt;&lt;P&gt;ceil(WeekEnd(SalesDate)-WeekStart(SalesDate))&lt;/P&gt;&lt;P&gt;ceil(QuarterEnd(SalesDate)-QuarterStart(SalesDate))&lt;/P&gt;&lt;P&gt;where SalesDate is your Date Dimension&lt;/P&gt;&lt;P&gt;Hope this helps&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 May 2015 17:52:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-Distinct-Date/m-p/880867#M307377</guid>
      <dc:creator>sasiparupudi1</dc:creator>
      <dc:date>2015-05-29T17:52:12Z</dc:date>
    </item>
    <item>
      <title>Re: Count Distinct Date</title>
      <link>https://community.qlik.com/t5/QlikView/Count-Distinct-Date/m-p/880868#M307378</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN class="replyToName"&gt;&lt;STRONG&gt;Thanks sunindia&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That worked for the Chart&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 May 2015 18:26:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-Distinct-Date/m-p/880868#M307378</guid>
      <dc:creator />
      <dc:date>2015-05-29T18:26:04Z</dc:date>
    </item>
    <item>
      <title>Re: Count Distinct Date</title>
      <link>https://community.qlik.com/t5/QlikView/Count-Distinct-Date/m-p/880869#M307379</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No Problem &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 May 2015 18:27:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-Distinct-Date/m-p/880869#M307379</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-05-29T18:27:14Z</dc:date>
    </item>
  </channel>
</rss>

