<?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: derive half year in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/derive-half-year/m-p/1535026#M747024</link>
    <description>if i use the above two conditions im getting 'H2' also as a value in the listbox.</description>
    <pubDate>Fri, 25 Jan 2019 11:05:55 GMT</pubDate>
    <dc:creator>Chanty4u</dc:creator>
    <dc:date>2019-01-25T11:05:55Z</dc:date>
    <item>
      <title>derive half year</title>
      <link>https://community.qlik.com/t5/QlikView/derive-half-year/m-p/1534978#M747021</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/46628"&gt;@sunny_talwar&lt;/a&gt;&lt;/P&gt;&lt;P&gt;I have one filed from database that is Quarter&amp;nbsp; &amp;nbsp;from this i need to derive year and half year&amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;Quarter&lt;/P&gt;&lt;P&gt;2018Q1&amp;nbsp;&lt;/P&gt;&lt;P&gt;2018Q2&lt;/P&gt;&lt;P&gt;2018Q3&lt;/P&gt;&lt;P&gt;2018Q4&lt;/P&gt;&lt;P&gt;2019Q1&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;so i have created like this .&amp;nbsp; is there any other way to derive half year?&lt;/P&gt;&lt;P&gt;Q1 and Q2&amp;nbsp; &amp;nbsp;as&amp;nbsp; &amp;nbsp;H1&amp;nbsp; &amp;nbsp; &amp;nbsp; first half year&amp;nbsp;&lt;/P&gt;&lt;P&gt;Q3 and Q4&amp;nbsp; &amp;nbsp; as H2&amp;nbsp; &amp;nbsp; &amp;nbsp; second half year&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;script:&lt;/P&gt;&lt;P&gt;load&lt;/P&gt;&lt;P&gt;Quarter,&lt;BR /&gt;left(Quarter,4) as Year,&lt;BR /&gt;IF(Right(Quarter,1)= 1, LEFT(Quarter,4) &amp;amp; 'H1',&lt;BR /&gt;IF(Right(Quarter,1)= 2, LEFT(Quarter,4) &amp;amp; 'H1',&lt;BR /&gt;IF(Right(Quarter,1)= 3, LEFT(Quarter,4) &amp;amp; 'H2',&lt;BR /&gt;IF(Right(Quarter,1)= 4, LEFT(Quarter,4) &amp;amp; 'H2',Quarter)))) as Half_Year;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Note: My quarters&amp;nbsp; are&amp;nbsp; &amp;nbsp;[calendar year only]&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;jan,feb,mar&amp;nbsp; &amp;nbsp;Q1&lt;/P&gt;&lt;P&gt;aprl,may,jun&amp;nbsp; &amp;nbsp; &amp;nbsp;Q2&lt;/P&gt;&lt;P&gt;jul,aug,sep&amp;nbsp; Q3&lt;/P&gt;&lt;P&gt;oct,nov,dec&amp;nbsp; Q4..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 21:32:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/derive-half-year/m-p/1534978#M747021</guid>
      <dc:creator>Chanty4u</dc:creator>
      <dc:date>2024-11-16T21:32:14Z</dc:date>
    </item>
    <item>
      <title>Re: derive half year</title>
      <link>https://community.qlik.com/t5/QlikView/derive-half-year/m-p/1535018#M747022</link>
      <description>You can use also like this:&lt;BR /&gt;If(Right(Quarter, 1) &amp;lt; 3, LEFT(Quarter,4) &amp;amp; 'H1', LEFT(Quarter,4) &amp;amp; 'H2') as Half_Year&lt;BR /&gt;or&lt;BR /&gt;If(Match(Right(Quarter, 1), 1, 2), LEFT(Quarter,4) &amp;amp; 'H1', LEFT(Quarter,4) &amp;amp; 'H2') as Half_Year&lt;BR /&gt;&lt;BR /&gt;Are you looking for this solutions?</description>
      <pubDate>Fri, 25 Jan 2019 10:55:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/derive-half-year/m-p/1535018#M747022</guid>
      <dc:creator>MindaugasBacius</dc:creator>
      <dc:date>2019-01-25T10:55:25Z</dc:date>
    </item>
    <item>
      <title>Re: derive half year</title>
      <link>https://community.qlik.com/t5/QlikView/derive-half-year/m-p/1535025#M747023</link>
      <description>Besides I have forgotten to mention mapping option:&lt;BR /&gt;map_half_year:&lt;BR /&gt;Mapping LOAD * INLINE [&lt;BR /&gt;F1, F2&lt;BR /&gt;1, H1&lt;BR /&gt;2, H2&lt;BR /&gt;3, H3&lt;BR /&gt;4, H4&lt;BR /&gt;];&lt;BR /&gt;&lt;BR /&gt;In your Calendar table write this expression:&lt;BR /&gt;LEFT(Quarter,4) &amp;amp; ApplyMap('map_half_year', Right(Quarter, 1)) as Half_Year</description>
      <pubDate>Fri, 25 Jan 2019 11:05:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/derive-half-year/m-p/1535025#M747023</guid>
      <dc:creator>MindaugasBacius</dc:creator>
      <dc:date>2019-01-25T11:05:49Z</dc:date>
    </item>
    <item>
      <title>Re: derive half year</title>
      <link>https://community.qlik.com/t5/QlikView/derive-half-year/m-p/1535026#M747024</link>
      <description>if i use the above two conditions im getting 'H2' also as a value in the listbox.</description>
      <pubDate>Fri, 25 Jan 2019 11:05:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/derive-half-year/m-p/1535026#M747024</guid>
      <dc:creator>Chanty4u</dc:creator>
      <dc:date>2019-01-25T11:05:55Z</dc:date>
    </item>
    <item>
      <title>Re: derive half year</title>
      <link>https://community.qlik.com/t5/QlikView/derive-half-year/m-p/1535071#M747025</link>
      <description>&lt;P&gt;May be try something like this&lt;/P&gt;&lt;PRE&gt;MappingTable:
Mapping
LOAD * INLINE [
    Quarters, HalfYears
    Q1, H1
    Q2, H1
    Q3, H2
    Q4, H2
];

Fact:
LOAD *,
	 MapSubString('MappingTable', Quarter) as Half_Year;
LOAD * INLINE [
    Quarter
    2018Q1
    2018Q2
    2018Q3
    2018Q4
    2019Q1
];&lt;/PRE&gt;</description>
      <pubDate>Fri, 25 Jan 2019 12:10:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/derive-half-year/m-p/1535071#M747025</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2019-01-25T12:10:42Z</dc:date>
    </item>
    <item>
      <title>Re: derive half year</title>
      <link>https://community.qlik.com/t5/QlikView/derive-half-year/m-p/1535086#M747027</link>
      <description>thank you sunny. but my data will increase so many quarters will come.. is inline will work? again i need to write the quarter values right?</description>
      <pubDate>Fri, 25 Jan 2019 12:24:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/derive-half-year/m-p/1535086#M747027</guid>
      <dc:creator>Chanty4u</dc:creator>
      <dc:date>2019-01-25T12:24:47Z</dc:date>
    </item>
    <item>
      <title>Re: derive half year</title>
      <link>https://community.qlik.com/t5/QlikView/derive-half-year/m-p/1535103#M747028</link>
      <description>&lt;P&gt;Are you saying that you might have quarters come in as Q5, Q6, Q7, Q8... and so on? &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;If not, then inline can stay the same &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Jan 2019 12:42:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/derive-half-year/m-p/1535103#M747028</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2019-01-25T12:42:10Z</dc:date>
    </item>
    <item>
      <title>Re: derive half year</title>
      <link>https://community.qlik.com/t5/QlikView/derive-half-year/m-p/1535109#M747029</link>
      <description>sorry my bad &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;</description>
      <pubDate>Fri, 25 Jan 2019 12:50:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/derive-half-year/m-p/1535109#M747029</guid>
      <dc:creator>Chanty4u</dc:creator>
      <dc:date>2019-01-25T12:50:19Z</dc:date>
    </item>
  </channel>
</rss>

