<?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 Divide by month / Year in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Divide-by-month-Year/m-p/1122322#M1237454</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have to load some data and group by month and year. The field "SIMPLEDATE" is composed of Year-Month-Day (2015-11-30). &lt;BR /&gt;I need to divide this field and create two new field, YEAR and MONTH, so I can group by with this two new fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have this script:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; SIMPLEDATE&lt;/P&gt;&lt;P&gt;&amp;nbsp; count(*) as rich_totali&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;FROM&amp;nbsp; [log.qvd]&lt;/P&gt;&lt;P&gt;(qvd)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;group by&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;SIMPLEDATE &lt;BR /&gt;store * from log into [ogSintesi.qvd] (qvd);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;_____________________________________________________________&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need something like this&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;LOAD&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Year([SIMPLEDATE]) as YEAR,&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Month([SIMPLEDATE]) as MONTH,&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt; count(*) as rich_totali&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;FROM&amp;nbsp; [log.qvd]&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;(qvd)&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;group by&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;YEAR,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;MONTH, &lt;BR /&gt;store * from log into [ogSintesi.qvd] (qvd);&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 26 Jan 2026 16:26:21 GMT</pubDate>
    <dc:creator />
    <dc:date>2026-01-26T16:26:21Z</dc:date>
    <item>
      <title>Divide by month / Year</title>
      <link>https://community.qlik.com/t5/QlikView/Divide-by-month-Year/m-p/1122322#M1237454</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have to load some data and group by month and year. The field "SIMPLEDATE" is composed of Year-Month-Day (2015-11-30). &lt;BR /&gt;I need to divide this field and create two new field, YEAR and MONTH, so I can group by with this two new fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have this script:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; SIMPLEDATE&lt;/P&gt;&lt;P&gt;&amp;nbsp; count(*) as rich_totali&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;FROM&amp;nbsp; [log.qvd]&lt;/P&gt;&lt;P&gt;(qvd)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;group by&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;SIMPLEDATE &lt;BR /&gt;store * from log into [ogSintesi.qvd] (qvd);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;_____________________________________________________________&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need something like this&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;LOAD&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Year([SIMPLEDATE]) as YEAR,&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Month([SIMPLEDATE]) as MONTH,&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt; count(*) as rich_totali&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;FROM&amp;nbsp; [log.qvd]&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;(qvd)&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;group by&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;YEAR,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;MONTH, &lt;BR /&gt;store * from log into [ogSintesi.qvd] (qvd);&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Jan 2026 16:26:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Divide-by-month-Year/m-p/1122322#M1237454</guid>
      <dc:creator />
      <dc:date>2026-01-26T16:26:21Z</dc:date>
    </item>
    <item>
      <title>Re: Divide by month / Year</title>
      <link>https://community.qlik.com/t5/QlikView/Divide-by-month-Year/m-p/1122323#M1237455</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is that SIMPLEDATE stored as text or actually stored as a date but shown in this weird format?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If it is text, you could use these:&lt;/P&gt;&lt;P&gt;left(SIMPLEDATE, 4) as YEAR,&lt;/P&gt;&lt;P&gt;mid(SIMPLEDATE, 6, 2) as Month&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 May 2016 09:10:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Divide-by-month-Year/m-p/1122323#M1237455</guid>
      <dc:creator>oknotsen</dc:creator>
      <dc:date>2016-05-23T09:10:12Z</dc:date>
    </item>
  </channel>
</rss>

