<?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 year and month for the KPI in Visualization and Usability</title>
    <link>https://community.qlik.com/t5/Visualization-and-Usability/Extract-year-and-month-for-the-KPI/m-p/137873#M30496</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have attached to files, how to get the&amp;nbsp; year and month like Jan 2018 .&lt;/P&gt;&lt;P&gt;I used the following ,&amp;nbsp; but i get hyphen as a result&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;yearmonth file is having date formats of kind yyyy-mm and YY/DD/M&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Year(Date(date#(subfield([Invoice Date],' ',1),'MM/DD/YYYY')))&lt;/P&gt;&lt;P&gt;Year(Date#(YearMonth, 'YYYY-MM'))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Both dint yield any result&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 30 Jul 2018 07:06:26 GMT</pubDate>
    <dc:creator>deepak_km9886</dc:creator>
    <dc:date>2018-07-30T07:06:26Z</dc:date>
    <item>
      <title>Extract year and month for the KPI</title>
      <link>https://community.qlik.com/t5/Visualization-and-Usability/Extract-year-and-month-for-the-KPI/m-p/137873#M30496</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have attached to files, how to get the&amp;nbsp; year and month like Jan 2018 .&lt;/P&gt;&lt;P&gt;I used the following ,&amp;nbsp; but i get hyphen as a result&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;yearmonth file is having date formats of kind yyyy-mm and YY/DD/M&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Year(Date(date#(subfield([Invoice Date],' ',1),'MM/DD/YYYY')))&lt;/P&gt;&lt;P&gt;Year(Date#(YearMonth, 'YYYY-MM'))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Both dint yield any result&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jul 2018 07:06:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Visualization-and-Usability/Extract-year-and-month-for-the-KPI/m-p/137873#M30496</guid>
      <dc:creator>deepak_km9886</dc:creator>
      <dc:date>2018-07-30T07:06:26Z</dc:date>
    </item>
    <item>
      <title>Re: Extract year and month for the KPI</title>
      <link>https://community.qlik.com/t5/Visualization-and-Usability/Extract-year-and-month-for-the-KPI/m-p/137874#M30497</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;Use Alt and MonthName functions together.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-RC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jul 2018 07:16:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Visualization-and-Usability/Extract-year-and-month-for-the-KPI/m-p/137874#M30497</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-07-30T07:16:31Z</dc:date>
    </item>
    <item>
      <title>Re: Extract year and month for the KPI</title>
      <link>https://community.qlik.com/t5/Visualization-and-Usability/Extract-year-and-month-for-the-KPI/m-p/137875#M30498</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Date(Date#([Invoice Date'],'MM/DD/YYYY'),'MMM YYYY') AS YearMonth&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;&amp;nbsp; LIB://DATA/Invoice.xlsx (ooxml........ );&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will keep the underlying day of the month but display only the month and year part. If you want a date that always is the first of the month you will have to add MonthStart() like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Date(&lt;STRONG&gt;MonthStart&lt;/STRONG&gt;(Date#([Invoice Date'],'MM/DD/YYYY')),'MMM YYYY') AS YearMonth&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Date( If( Index( YearMonth ,'-' ) , Date#(YearMonth&amp;amp;'-01','YYYY-MM-DD') , Date#(YearMonth, 'YY/DD/M') ) ,'MMM YYYY') AS YearMonth&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;&amp;nbsp; LIB://DATA/YearMonth.xlsx (ooxml.....);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here you probably want the YearMonth to always start at the first of any given month:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp; Date( &lt;STRONG&gt;MonthStart&lt;/STRONG&gt;(If( Index( YearMonth ,'-' ) , Date#(YearMonth&amp;amp;'-01','YYYY-MM-DD') , Date#(YearMonth, 'YY/DD/M'))) ,'MMM &lt;SPAN style="font-size: 13.3333px;"&gt;YYYY') AS YearMonth&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jul 2018 07:32:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Visualization-and-Usability/Extract-year-and-month-for-the-KPI/m-p/137875#M30498</guid>
      <dc:creator>petter</dc:creator>
      <dc:date>2018-07-30T07:32:50Z</dc:date>
    </item>
    <item>
      <title>Re: Extract year and month for the KPI</title>
      <link>https://community.qlik.com/t5/Visualization-and-Usability/Extract-year-and-month-for-the-KPI/m-p/137876#M30499</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 used this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;&lt;STRONG&gt;LOAD&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Invoice Date]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;MonthName&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Floor&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Invoice Date]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)) &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;MonthName&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;FROM&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[...\Testing\Invoice.xlsx]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt; (&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;ooxml&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;embedded&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;labels&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;table&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;is&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; Sheet1); &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am getting the output as&lt;/P&gt;&lt;P&gt;&lt;IMG class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/209232_pastedImage_0.png" style="max-height: 900px; max-width: 1200px;" /&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Renuka S&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jul 2018 07:34:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Visualization-and-Usability/Extract-year-and-month-for-the-KPI/m-p/137876#M30499</guid>
      <dc:creator>renuka_sasikumar</dc:creator>
      <dc:date>2018-07-30T07:34:54Z</dc:date>
    </item>
  </channel>
</rss>

