<?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 Trading Calendar Month in Script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Trading-Calendar-Month-in-Script/m-p/296501#M1186819</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 currently use different extracts to do reports. One of our clients requested that I report using their trading calendars, where currently I report on normal calendar months.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is part of my script that concerns dates:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;DATE(DATE#( left([Effective Date],11), 'DD-MMM-YY')) as [Effective Date],&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; weekday(DATE(DATE#( left([Effective Date],11), 'DD-MMM-YY'))) as [Effective Day], &lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; month(DATE(DATE#( left([Effective Date],11), 'DD-MMM-YY'))) as [Effective Month], &lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; year(DATE(DATE#( left([Effective Date],11), 'DD-MMM-YY'))) as [Effective Year],&lt;/STRONG&gt;&lt;/EM&gt;&lt;EM&gt; &lt;/EM&gt;&amp;nbsp; &lt;/P&gt;&lt;DIV class="mcePaste" id="_mcePaste" style="left: -10000px; overflow: hidden; width: 1px; position: absolute; top: 0px; height: 1px;"&gt;&lt;P&gt;﻿&lt;/P&gt;&lt;P&gt;gg&lt;/P&gt;&lt;/DIV&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is taken from a Transaction Extract. It only has the field Effective Date, so I then create Effective Day, Effective Month and Effective Year, all of which I then use in expressions. I will for instance do analysis on Turnover for a particular month by looking at where the Effective Month is September.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Their trading calendar month is different, it runs (for this month) from 28/08/2011 to 24/09/2011. So when I do a certain report for September, it must not run from 1 to 30 September but from 28 August to 24 September.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I would like to do is create a new field called Effective Trading Month. Please can you help me with the expression. It must be something like this but I can't get it right:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if( &lt;STRONG&gt;&lt;EM&gt;DATE(DATE#( left([Effective Date],11), 'DD-MMM-YY')&amp;lt;=2011/09/24&amp;gt;=2011/08/28, 'September', &lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;if( &lt;STRONG&gt;&lt;EM&gt;DATE(DATE#( left([Effective Date],11), 'DD-MMM-YY')&amp;lt;=2011/10/29&amp;gt;=2011/09/25, October,,&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;etc.&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;etc.&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;)))) as [Effective Trading Month]&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt; &lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt; &lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Does this make any sense?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Gerhard&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 28 Sep 2011 10:46:56 GMT</pubDate>
    <dc:creator>gerhardl</dc:creator>
    <dc:date>2011-09-28T10:46:56Z</dc:date>
    <item>
      <title>Trading Calendar Month in Script</title>
      <link>https://community.qlik.com/t5/QlikView/Trading-Calendar-Month-in-Script/m-p/296501#M1186819</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 currently use different extracts to do reports. One of our clients requested that I report using their trading calendars, where currently I report on normal calendar months.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is part of my script that concerns dates:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;DATE(DATE#( left([Effective Date],11), 'DD-MMM-YY')) as [Effective Date],&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; weekday(DATE(DATE#( left([Effective Date],11), 'DD-MMM-YY'))) as [Effective Day], &lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; month(DATE(DATE#( left([Effective Date],11), 'DD-MMM-YY'))) as [Effective Month], &lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; year(DATE(DATE#( left([Effective Date],11), 'DD-MMM-YY'))) as [Effective Year],&lt;/STRONG&gt;&lt;/EM&gt;&lt;EM&gt; &lt;/EM&gt;&amp;nbsp; &lt;/P&gt;&lt;DIV class="mcePaste" id="_mcePaste" style="left: -10000px; overflow: hidden; width: 1px; position: absolute; top: 0px; height: 1px;"&gt;&lt;P&gt;﻿&lt;/P&gt;&lt;P&gt;gg&lt;/P&gt;&lt;/DIV&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is taken from a Transaction Extract. It only has the field Effective Date, so I then create Effective Day, Effective Month and Effective Year, all of which I then use in expressions. I will for instance do analysis on Turnover for a particular month by looking at where the Effective Month is September.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Their trading calendar month is different, it runs (for this month) from 28/08/2011 to 24/09/2011. So when I do a certain report for September, it must not run from 1 to 30 September but from 28 August to 24 September.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I would like to do is create a new field called Effective Trading Month. Please can you help me with the expression. It must be something like this but I can't get it right:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if( &lt;STRONG&gt;&lt;EM&gt;DATE(DATE#( left([Effective Date],11), 'DD-MMM-YY')&amp;lt;=2011/09/24&amp;gt;=2011/08/28, 'September', &lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;if( &lt;STRONG&gt;&lt;EM&gt;DATE(DATE#( left([Effective Date],11), 'DD-MMM-YY')&amp;lt;=2011/10/29&amp;gt;=2011/09/25, October,,&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;etc.&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;etc.&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;)))) as [Effective Trading Month]&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt; &lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt; &lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Does this make any sense?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Gerhard&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Sep 2011 10:46:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Trading-Calendar-Month-in-Script/m-p/296501#M1186819</guid>
      <dc:creator>gerhardl</dc:creator>
      <dc:date>2011-09-28T10:46:56Z</dc:date>
    </item>
  </channel>
</rss>

