<?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: Date Problem Getting Just Year Value Without Duplicates in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Date-Problem-Getting-Just-Year-Value-Without-Duplicates/m-p/83896#M5589</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello All:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First, thanks to anyone who may have taken the time to view this post.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The issue is resolved.&amp;nbsp; I determined that I needed&amp;nbsp; to use &lt;SPAN style="font-size: 10pt;"&gt;&lt;SPAN style="color: #0000ff;"&gt;Year&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;[Approval Complete Date]&lt;/SPAN&gt;) &lt;SPAN style="color: #0000ff;"&gt;as&lt;/SPAN&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 10pt;"&gt;[Approval Completed Year] &lt;SPAN style="color: #000000;"&gt;in my Load Script as opposed to any of the other three options I listed in my original post.&amp;nbsp; That gives me just the Year value and no duplicates, for example, in my straight table when I click the filter arrow for the Approval Completed Year column (I only get 3 choices, 2016, 2017 and 2018 and not two 2016 , 12 2017 and two 2018 choices).&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #800000; font-size: 12pt;"&gt;&lt;SPAN style="color: #000000; font-size: 10pt;"&gt;Additionally, I had the same problem with formatting the date as YYYYMM.&amp;nbsp; To solve that problem, I used &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 12pt;"&gt;Date&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 12pt;"&gt;MonthStart&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 12pt;"&gt;[Approval Complete Date]&lt;/SPAN&gt;&lt;SPAN&gt;), 'YYYYMM') &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 12pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 12pt;"&gt;[Approval Completed YearMonth] &lt;SPAN style="color: #000000;"&gt;in my Load script as well.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 12pt;"&gt;If anyone should have any comments or feedback, please let me know.&amp;nbsp; Thanks.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 11 Feb 2018 20:07:58 GMT</pubDate>
    <dc:creator>pnn44794</dc:creator>
    <dc:date>2018-02-11T20:07:58Z</dc:date>
    <item>
      <title>Date Problem Getting Just Year Value Without Duplicates</title>
      <link>https://community.qlik.com/t5/App-Development/Date-Problem-Getting-Just-Year-Value-Without-Duplicates/m-p/83895#M5588</link>
      <description>&lt;P&gt;Hello:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to get just the year value from another date field.&amp;nbsp; I can get just the year, but I wind up with "duplicates", meaning I have 2 choices for 2016 (data only goes back to November 2016), 12 for 2017 and two for 2018 (assuming Jan and Feb).&amp;nbsp; I'm using a straight table and I'm wanting to have just 3 values to choose from when clicking on the drop down arrow for Approval Completed Year, so just one 2016, one 2017 and one 2018.&amp;nbsp; I've attached sample data in case it's needed.&amp;nbsp; Approval Complete Date is the column I'm trying to get the Year value from.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The data is being loaded from an Excel file and I've confirmed Excel has Approval Complete Date (the field I want Year from) formatted as a Date field (see attached sample data).&amp;nbsp; The following is what I've tried from within the load script and the results.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Date([Approval Complete Date], 'YYYY') as [Approval Complete Year], &amp;lt;-- I get multiple 2016, 2017 and 2018 values, one for just about each row of the data&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;Date&lt;/SPAN&gt;&lt;SPAN&gt;(MonthStart([Approval Complete Date]), 'YYYY') as [Approval Complete Year]&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;, &amp;lt;-- I get the results described in the first paragraph above - I've also tried this as the Dimension, with out of course the as part&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;Date&lt;/SPAN&gt;&lt;SPAN&gt;(Date#([Approval Complete Date], 'MM/DD/YYYY'), 'YYYY') as [Approval Complete Year]&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt; &amp;lt;-- I get no Year results&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;Hopefully, I'm just missing something simple.&amp;nbsp; As always, any and all help is appreciated.&amp;nbsp; Thanks in advance.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 12 Oct 2019 22:16:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Date-Problem-Getting-Just-Year-Value-Without-Duplicates/m-p/83895#M5588</guid>
      <dc:creator>pnn44794</dc:creator>
      <dc:date>2019-10-12T22:16:34Z</dc:date>
    </item>
    <item>
      <title>Re: Date Problem Getting Just Year Value Without Duplicates</title>
      <link>https://community.qlik.com/t5/App-Development/Date-Problem-Getting-Just-Year-Value-Without-Duplicates/m-p/83896#M5589</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello All:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First, thanks to anyone who may have taken the time to view this post.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The issue is resolved.&amp;nbsp; I determined that I needed&amp;nbsp; to use &lt;SPAN style="font-size: 10pt;"&gt;&lt;SPAN style="color: #0000ff;"&gt;Year&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;[Approval Complete Date]&lt;/SPAN&gt;) &lt;SPAN style="color: #0000ff;"&gt;as&lt;/SPAN&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 10pt;"&gt;[Approval Completed Year] &lt;SPAN style="color: #000000;"&gt;in my Load Script as opposed to any of the other three options I listed in my original post.&amp;nbsp; That gives me just the Year value and no duplicates, for example, in my straight table when I click the filter arrow for the Approval Completed Year column (I only get 3 choices, 2016, 2017 and 2018 and not two 2016 , 12 2017 and two 2018 choices).&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #800000; font-size: 12pt;"&gt;&lt;SPAN style="color: #000000; font-size: 10pt;"&gt;Additionally, I had the same problem with formatting the date as YYYYMM.&amp;nbsp; To solve that problem, I used &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 12pt;"&gt;Date&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 12pt;"&gt;MonthStart&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 12pt;"&gt;[Approval Complete Date]&lt;/SPAN&gt;&lt;SPAN&gt;), 'YYYYMM') &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 12pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 12pt;"&gt;[Approval Completed YearMonth] &lt;SPAN style="color: #000000;"&gt;in my Load script as well.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 12pt;"&gt;If anyone should have any comments or feedback, please let me know.&amp;nbsp; Thanks.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 11 Feb 2018 20:07:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Date-Problem-Getting-Just-Year-Value-Without-Duplicates/m-p/83896#M5589</guid>
      <dc:creator>pnn44794</dc:creator>
      <dc:date>2018-02-11T20:07:58Z</dc:date>
    </item>
  </channel>
</rss>

