<?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 question about creating a new field while loading data in Qlik Learning Discussions</title>
    <link>https://community.qlik.com/t5/Qlik-Learning-Discussions/question-about-creating-a-new-field-while-loading-data/m-p/819320#M2848</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have a field Month in my source data. My task is to generate a new feld named Quarter based on the Month field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, while loading data I'd like to set the following condition:&lt;/P&gt;&lt;P&gt;- for values Jan, Feb, Mar generate value Q1 in the Quarter field&lt;/P&gt;&lt;P&gt;- for values &lt;SPAN style="font-size: 13.3333330154419px;"&gt;Apr, May, Jun generate value Q2 in the Quarter field&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;- for values &lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;Jul, Aug, Sep generate value Q3 in the Quarter field&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;- for values &lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;Oct, Nov, Dec generate value Q4 in the Quarter field&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;Which operators should I use to implement it?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;Thank you in advance,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;Larisa&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 17 Mar 2015 13:01:30 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2015-03-17T13:01:30Z</dc:date>
    <item>
      <title>question about creating a new field while loading data</title>
      <link>https://community.qlik.com/t5/Qlik-Learning-Discussions/question-about-creating-a-new-field-while-loading-data/m-p/819320#M2848</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have a field Month in my source data. My task is to generate a new feld named Quarter based on the Month field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, while loading data I'd like to set the following condition:&lt;/P&gt;&lt;P&gt;- for values Jan, Feb, Mar generate value Q1 in the Quarter field&lt;/P&gt;&lt;P&gt;- for values &lt;SPAN style="font-size: 13.3333330154419px;"&gt;Apr, May, Jun generate value Q2 in the Quarter field&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;- for values &lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;Jul, Aug, Sep generate value Q3 in the Quarter field&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;- for values &lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;Oct, Nov, Dec generate value Q4 in the Quarter field&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;Which operators should I use to implement it?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;Thank you in advance,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;Larisa&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Mar 2015 13:01:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Learning-Discussions/question-about-creating-a-new-field-while-loading-data/m-p/819320#M2848</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-03-17T13:01:30Z</dc:date>
    </item>
    <item>
      <title>Re: question about creating a new field while loading data</title>
      <link>https://community.qlik.com/t5/Qlik-Learning-Discussions/question-about-creating-a-new-field-while-loading-data/m-p/819321#M2849</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;See attached example.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Mar 2015 13:51:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Learning-Discussions/question-about-creating-a-new-field-while-loading-data/m-p/819321#M2849</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2015-03-17T13:51:37Z</dc:date>
    </item>
    <item>
      <title>Re: question about creating a new field while loading data</title>
      <link>https://community.qlik.com/t5/Qlik-Learning-Discussions/question-about-creating-a-new-field-while-loading-data/m-p/819322#M2850</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Larisa,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First, you need to convert the Month field from alphanumeric string to a number. You can do it in a number of ways. One of them is this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Match(Month, 'Jan', 'Feb', 'Mar', ..., 'Dec')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then, use this commonly used calculation of the Quarter:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'Q' &amp;amp; ceil(MonthNumber/3) as Quarter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cheers,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Oleg Troyansky&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.masterssummit.com/"&gt;www.masterssummit.com&lt;/A&gt; - take you QlikView skills to the next level!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Mar 2015 13:54:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Learning-Discussions/question-about-creating-a-new-field-while-loading-data/m-p/819322#M2850</guid>
      <dc:creator>Oleg_Troyansky</dc:creator>
      <dc:date>2015-03-17T13:54:47Z</dc:date>
    </item>
    <item>
      <title>Re: question about creating a new field while loading data</title>
      <link>https://community.qlik.com/t5/Qlik-Learning-Discussions/question-about-creating-a-new-field-while-loading-data/m-p/819323#M2851</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Gysbert suggests&lt;/P&gt;&lt;P&gt;&amp;nbsp; 'Q' &amp;amp; ceil(month(Month)/3) as Quarter&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would do it slightly more elaborate (to get numeric values):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Dual('Q' &amp;amp; ceil(month(Month)/3), ceil(month(Month)/3)) as Quarter;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want sequential quarters, you can use QuarterName()&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HIC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Mar 2015 13:59:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Learning-Discussions/question-about-creating-a-new-field-while-loading-data/m-p/819323#M2851</guid>
      <dc:creator>hic</dc:creator>
      <dc:date>2015-03-17T13:59:09Z</dc:date>
    </item>
  </channel>
</rss>

