<?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: qlikview scripting query in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/qlikview-scripting-query/m-p/1964996#M1220306</link>
    <description>&lt;P&gt;IMO the easiest way to address such tasks is to use a running counter for the period field. This could be done with autonumber() within the master-calendar, like:&lt;/P&gt;
&lt;P&gt;load *, autonumber(Year &amp;amp; Q) as RunningQ;&lt;BR /&gt;load *, ceil(Month / 3) as Q;&lt;BR /&gt;load *, year(Date) as Year, month(Date) as Month;&lt;BR /&gt;load date(from - 1 + recno()) as Date autogerate bis- from;&lt;/P&gt;
&lt;P&gt;Similar stuff might be also done against YearMonth or YearWeek. Each needed period-field should be created there - in each case as numeric and if needed also as strings or dual() values. The numeric ones might not be shown anywhere but they are needed to calculate/compare anything against each other.&lt;/P&gt;
&lt;P&gt;Beside this you could also create a working counter with something like this:&lt;/P&gt;
&lt;P&gt;Year * 4 + Quarter as RunningQ&lt;/P&gt;
&lt;P&gt;- Marcus&lt;/P&gt;</description>
    <pubDate>Fri, 05 Aug 2022 07:31:32 GMT</pubDate>
    <dc:creator>marcus_sommer</dc:creator>
    <dc:date>2022-08-05T07:31:32Z</dc:date>
    <item>
      <title>qlikview scripting query</title>
      <link>https://community.qlik.com/t5/QlikView/qlikview-scripting-query/m-p/1964913#M1220301</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;How to get previous quarter for ex:&lt;/P&gt;
&lt;P&gt;i have 2022Q1 ,the previous quarter is 2021Q4, but for me getting 2022Q0,because i have use variables&lt;/P&gt;
&lt;P&gt;left(datefield,4)&amp;amp;'Q'&amp;amp;ceil(Month(datefield/3)) for current quarter&lt;/P&gt;
&lt;P&gt;left(datefield,4)&amp;amp;'Q'&amp;amp;ceil(Month(datefield/3))-1 for previous quarter&lt;/P&gt;</description>
      <pubDate>Fri, 05 Aug 2022 04:38:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/qlikview-scripting-query/m-p/1964913#M1220301</guid>
      <dc:creator>Sunil_26</dc:creator>
      <dc:date>2022-08-05T04:38:06Z</dc:date>
    </item>
    <item>
      <title>Re: qlikview scripting query</title>
      <link>https://community.qlik.com/t5/QlikView/qlikview-scripting-query/m-p/1964960#M1220302</link>
      <description>&lt;P&gt;HI&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/173018"&gt;@Sunil_26&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You need to adjust the date not the final result something like the below.&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;left(Addmonths(datefield-3),4)&amp;amp;'Q'&amp;amp;ceil(Month(Addmonths(datefield,-3)/3))&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Aug 2022 06:47:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/qlikview-scripting-query/m-p/1964960#M1220302</guid>
      <dc:creator>Mark_Little</dc:creator>
      <dc:date>2022-08-05T06:47:05Z</dc:date>
    </item>
    <item>
      <title>Re: qlikview scripting query</title>
      <link>https://community.qlik.com/t5/QlikView/qlikview-scripting-query/m-p/1964962#M1220303</link>
      <description>&lt;P&gt;ok i will try and let you know if it works&lt;/P&gt;</description>
      <pubDate>Fri, 05 Aug 2022 06:49:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/qlikview-scripting-query/m-p/1964962#M1220303</guid>
      <dc:creator>Sunil_26</dc:creator>
      <dc:date>2022-08-05T06:49:27Z</dc:date>
    </item>
    <item>
      <title>Re: qlikview scripting query</title>
      <link>https://community.qlik.com/t5/QlikView/qlikview-scripting-query/m-p/1964970#M1220304</link>
      <description>&lt;P&gt;hi is this works for only one qurter what if i change the quarter to 2022Q2, i need dynamically expresssion&lt;/P&gt;</description>
      <pubDate>Fri, 05 Aug 2022 07:04:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/qlikview-scripting-query/m-p/1964970#M1220304</guid>
      <dc:creator>Sunil_26</dc:creator>
      <dc:date>2022-08-05T07:04:08Z</dc:date>
    </item>
    <item>
      <title>Re: qlikview scripting query</title>
      <link>https://community.qlik.com/t5/QlikView/qlikview-scripting-query/m-p/1964996#M1220306</link>
      <description>&lt;P&gt;IMO the easiest way to address such tasks is to use a running counter for the period field. This could be done with autonumber() within the master-calendar, like:&lt;/P&gt;
&lt;P&gt;load *, autonumber(Year &amp;amp; Q) as RunningQ;&lt;BR /&gt;load *, ceil(Month / 3) as Q;&lt;BR /&gt;load *, year(Date) as Year, month(Date) as Month;&lt;BR /&gt;load date(from - 1 + recno()) as Date autogerate bis- from;&lt;/P&gt;
&lt;P&gt;Similar stuff might be also done against YearMonth or YearWeek. Each needed period-field should be created there - in each case as numeric and if needed also as strings or dual() values. The numeric ones might not be shown anywhere but they are needed to calculate/compare anything against each other.&lt;/P&gt;
&lt;P&gt;Beside this you could also create a working counter with something like this:&lt;/P&gt;
&lt;P&gt;Year * 4 + Quarter as RunningQ&lt;/P&gt;
&lt;P&gt;- Marcus&lt;/P&gt;</description>
      <pubDate>Fri, 05 Aug 2022 07:31:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/qlikview-scripting-query/m-p/1964996#M1220306</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2022-08-05T07:31:32Z</dc:date>
    </item>
  </channel>
</rss>

