<?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 Extract only distinct values from date in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Extract-only-distinct-values-from-date/m-p/1186890#M884509</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Folks,&lt;/P&gt;&lt;P&gt;I Have a date filed which is having date like&lt;/P&gt;&lt;P&gt;DATE&lt;/P&gt;&lt;P&gt;11/12/2013 11:00:00&lt;/P&gt;&lt;P&gt;11/12/2013 12:00:00&lt;/P&gt;&lt;P&gt;11/12/2013 12:30:00.&lt;/P&gt;&lt;P&gt;10/12/2013 09:00:00&lt;/P&gt;&lt;P&gt;10/12/2013 10:00:00&lt;/P&gt;&lt;P&gt;when i used&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;date(DATE,'MM-YYYY') as MONTH_YEAR.&lt;/STRONG&gt; When I use this MONTH_YEAR to list box it is showing duplicate values also.&lt;/P&gt;&lt;P&gt;Please help me in getting only unique records.&lt;/P&gt;&lt;P&gt;below is what it is showing me in list box&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LISTBOX&lt;/P&gt;&lt;P&gt;11-2013&lt;/P&gt;&lt;P&gt;11-2013&lt;/P&gt;&lt;P&gt;11-2013&lt;/P&gt;&lt;P&gt;10-2013&lt;/P&gt;&lt;P&gt;10-2013&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Expected:&lt;/P&gt;&lt;P&gt;11-2013&lt;/P&gt;&lt;P&gt;10-2013&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
    <dc:creator>viveksingh</dc:creator>
    <dc:date>2020-11-25T16:16:04Z</dc:date>
    <item>
      <title>Extract only distinct values from date</title>
      <link>https://community.qlik.com/t5/QlikView/Extract-only-distinct-values-from-date/m-p/1186890#M884509</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Folks,&lt;/P&gt;&lt;P&gt;I Have a date filed which is having date like&lt;/P&gt;&lt;P&gt;DATE&lt;/P&gt;&lt;P&gt;11/12/2013 11:00:00&lt;/P&gt;&lt;P&gt;11/12/2013 12:00:00&lt;/P&gt;&lt;P&gt;11/12/2013 12:30:00.&lt;/P&gt;&lt;P&gt;10/12/2013 09:00:00&lt;/P&gt;&lt;P&gt;10/12/2013 10:00:00&lt;/P&gt;&lt;P&gt;when i used&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;date(DATE,'MM-YYYY') as MONTH_YEAR.&lt;/STRONG&gt; When I use this MONTH_YEAR to list box it is showing duplicate values also.&lt;/P&gt;&lt;P&gt;Please help me in getting only unique records.&lt;/P&gt;&lt;P&gt;below is what it is showing me in list box&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LISTBOX&lt;/P&gt;&lt;P&gt;11-2013&lt;/P&gt;&lt;P&gt;11-2013&lt;/P&gt;&lt;P&gt;11-2013&lt;/P&gt;&lt;P&gt;10-2013&lt;/P&gt;&lt;P&gt;10-2013&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Expected:&lt;/P&gt;&lt;P&gt;11-2013&lt;/P&gt;&lt;P&gt;10-2013&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Extract-only-distinct-values-from-date/m-p/1186890#M884509</guid>
      <dc:creator>viveksingh</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Extract only distinct values from date</title>
      <link>https://community.qlik.com/t5/QlikView/Extract-only-distinct-values-from-date/m-p/1186891#M884510</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try adding MonthStart() function:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Date(&lt;SPAN style="color: #ff0000;"&gt;MonthStart(&lt;/SPAN&gt;DATE&lt;SPAN style="color: #ff0000;"&gt;)&lt;/SPAN&gt;,'MM-YYYY') as MONTH_YEAR&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Sep 2016 19:02:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Extract-only-distinct-values-from-date/m-p/1186891#M884510</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-09-16T19:02:53Z</dc:date>
    </item>
    <item>
      <title>Re: Extract only distinct values from date</title>
      <link>https://community.qlik.com/t5/QlikView/Extract-only-distinct-values-from-date/m-p/1186892#M884511</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;&lt;STRONG style="font-size: 11.7px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;A href="https://community.qlik.com/people/stalwar1"&gt;stalwar1&lt;/A&gt;&lt;/STRONG&gt;answer works pretty well. I also use Floor() function with time stamps. Just another way of doing it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14740576179215468" jivemacro_uid="_14740576179215468"&gt;
&lt;P&gt;LOAD Date(Floor(Timestamp#(DATE, 'MM/DD/YYYY hh:mm:ss')), 'MM-YYYY') As DATE INLINE [&lt;/P&gt;
&lt;P&gt;&amp;nbsp; DATE&lt;/P&gt;
&lt;P&gt;&amp;nbsp; 11/12/2013 11:00:00&lt;/P&gt;
&lt;P&gt;&amp;nbsp; 11/12/2013 12:00:00&lt;/P&gt;
&lt;P&gt;&amp;nbsp; 11/12/2013 12:30:00.&lt;/P&gt;
&lt;P&gt;&amp;nbsp; 10/12/2013 09:00:00&lt;/P&gt;
&lt;P&gt;&amp;nbsp; 10/12/2013 10:00:00&lt;/P&gt;
&lt;P&gt;];&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Sep 2016 20:28:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Extract-only-distinct-values-from-date/m-p/1186892#M884511</guid>
      <dc:creator>sinanozdemir</dc:creator>
      <dc:date>2016-09-16T20:28:01Z</dc:date>
    </item>
    <item>
      <title>Re: Extract only distinct values from date</title>
      <link>https://community.qlik.com/t5/QlikView/Extract-only-distinct-values-from-date/m-p/1186893#M884512</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;But Floor alone won't work if you have other dates&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;OL class="dp-c" start="1" style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: #5c5c5c; margin: 0 0 1px 45px !important;"&gt;&lt;LI&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;PRE __default_attr="sql" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14740578053363012" jivemacro_uid="_14740578053363012"&gt;&lt;OL class="dp-c" start="1" style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: #5c5c5c; margin: 0 0 1px 45px !important;"&gt;
&lt;LI&gt;&lt;SPAN style="color: black; font-size: 9pt !important; font-style: inherit; background-color: inherit; font-weight: inherit;"&gt;LOAD Date(Floor(Timestamp#(DATE, 'MM/DD/YYYY hh:mm:ss')), 'MM-YYYY') As DATE INLINE [&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&amp;nbsp; DATE&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&amp;nbsp; 11/12/2013 11:00:00&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&amp;nbsp; 11/12/2013 12:00:00&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&lt;STRONG&gt;&amp;nbsp; 11/13/2013 12:00:00&lt;/STRONG&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&amp;nbsp; 11/12/2013 12:30:00&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&amp;nbsp; 10/12/2013 09:00:00&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&amp;nbsp; 10/12/2013 10:00:00&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;]; &lt;/SPAN&gt;&lt;/LI&gt;
&lt;/OL&gt;&lt;/PRE&gt;&lt;OL class="dp-c" start="1" style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: #5c5c5c; margin: 0 0 1px 45px !important;"&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt; &lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Sep 2016 20:29:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Extract-only-distinct-values-from-date/m-p/1186893#M884512</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-09-16T20:29:54Z</dc:date>
    </item>
    <item>
      <title>Re: Extract only distinct values from date</title>
      <link>https://community.qlik.com/t5/QlikView/Extract-only-distinct-values-from-date/m-p/1186894#M884513</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It actually worked. Since you are only using MM-YYYY format, it kinda groups them:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/137771_Capture.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Sep 2016 20:32:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Extract-only-distinct-values-from-date/m-p/1186894#M884513</guid>
      <dc:creator>sinanozdemir</dc:creator>
      <dc:date>2016-09-16T20:32:41Z</dc:date>
    </item>
    <item>
      <title>Re: Extract only distinct values from date</title>
      <link>https://community.qlik.com/t5/QlikView/Extract-only-distinct-values-from-date/m-p/1186895#M884514</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am seeing this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/137769_Capture.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With this added&lt;/P&gt;&lt;P&gt;LOAD Date(Floor(Timestamp#(DATE, 'MM/DD/YYYY hh:mm:ss')), 'MM-YYYY') As DATE INLINE [&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; DATE&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; 11/12/2013 11:00:00&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; 11/12/2013 12:00:00&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; 11/13/2013 12:00:00&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; 11/12/2013 12:30:00&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; 10/12/2013 09:00:00&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; 10/12/2013 10:00:00&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;]; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Sep 2016 20:35:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Extract-only-distinct-values-from-date/m-p/1186895#M884514</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-09-16T20:35:53Z</dc:date>
    </item>
    <item>
      <title>Re: Extract only distinct values from date</title>
      <link>https://community.qlik.com/t5/QlikView/Extract-only-distinct-values-from-date/m-p/1186896#M884515</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I didn't see "11/13/2013". It would only work based on the provided data.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Sep 2016 20:45:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Extract-only-distinct-values-from-date/m-p/1186896#M884515</guid>
      <dc:creator>sinanozdemir</dc:creator>
      <dc:date>2016-09-16T20:45:10Z</dc:date>
    </item>
    <item>
      <title>Re: Extract only distinct values from date</title>
      <link>https://community.qlik.com/t5/QlikView/Extract-only-distinct-values-from-date/m-p/1186897#M884516</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;‌Make sense&amp;nbsp;&amp;nbsp; . Apologize for not being clear about it earlier.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best&lt;/P&gt;&lt;P&gt;Sunny&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Sep 2016 20:49:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Extract-only-distinct-values-from-date/m-p/1186897#M884516</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-09-16T20:49:19Z</dc:date>
    </item>
    <item>
      <title>Re: Extract only distinct values from date</title>
      <link>https://community.qlik.com/t5/QlikView/Extract-only-distinct-values-from-date/m-p/1186898#M884517</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;vivek,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;distinctness of dual field values (like dates in QV) is determined by the numeric representation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Date() function will only change the text representation, not the number, that's why you see duplicates.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You need to change the number, either by using a rounding function or date &amp;amp; time function that transforms the timestamp, like Sunny suggested (and what would be the standard approch) or by using interpretation function Date#() to change the number in addition to the format function Date():&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;Date#(Date(DATE,'MM-YYYY'),'MM-YYYY') as MONTH_YEAR&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;&lt;A href="https://community.qlik.com/qlik-blogpost/2954"&gt;Why don’t my dates work?&lt;/A&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;&lt;A href="https://community.qlik.com/qlik-blogpost/2830"&gt;Data Types in QlikView&lt;/A&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;&lt;A href="https://community.qlik.com/qlik-blogpost/2622"&gt;Get the Dates Right&lt;/A&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Sep 2016 20:50:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Extract-only-distinct-values-from-date/m-p/1186898#M884517</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-09-16T20:50:53Z</dc:date>
    </item>
    <item>
      <title>Re: Extract only distinct values from date</title>
      <link>https://community.qlik.com/t5/QlikView/Extract-only-distinct-values-from-date/m-p/1186899#M884518</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are you able to resolve the issue Vivek? If you have, I would suggest closing this thread by marking the correct response. In case if you still have issues, please let us know and we might be able to help.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/docs/DOC-14806"&gt;Qlik Community Tip: Marking Replies as Correct or Helpful&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Sunny&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 17 Sep 2016 23:48:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Extract-only-distinct-values-from-date/m-p/1186899#M884518</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-09-17T23:48:43Z</dc:date>
    </item>
  </channel>
</rss>

