<?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: help creating a variable in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/help-creating-a-variable/m-p/405971#M151068</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, i have managed to do this now. &lt;/P&gt;&lt;P&gt;thanks &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 29 Apr 2013 11:44:44 GMT</pubDate>
    <dc:creator />
    <dc:date>2013-04-29T11:44:44Z</dc:date>
    <item>
      <title>help creating a variable</title>
      <link>https://community.qlik.com/t5/QlikView/help-creating-a-variable/m-p/405968#M151065</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need help creating a variable. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have the following fields:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[Reporting Period Index]&lt;/P&gt;&lt;P&gt;[Reporting Date]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to create 2 variables that will give me the start and end dates of the previous reporting period index.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;eg.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Currently in reporting period index 103&lt;/P&gt;&lt;P&gt;previous Reporting Period Index = 102&lt;/P&gt;&lt;P&gt;reporting dates for previous period = 27/12/2012 - 31/01/2013.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so i would want the variable to show 27/12/2012&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and the same for the end date. so a 2nd variable would show 31/01/2013&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone help me please?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Apr 2013 16:34:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/help-creating-a-variable/m-p/405968#M151065</guid>
      <dc:creator />
      <dc:date>2013-04-26T16:34:52Z</dc:date>
    </item>
    <item>
      <title>Re: help creating a variable</title>
      <link>https://community.qlik.com/t5/QlikView/help-creating-a-variable/m-p/405969#M151066</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vStartPreviousPeriod: min({&amp;lt;&lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;[Reporting Date]&lt;/SPAN&gt;=,&lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;[Reporting Period Index]&lt;/SPAN&gt;={$(max(&lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;[Reporting Period Index]&lt;/SPAN&gt;)-1)}&amp;gt;} [Reporting Date])&lt;/P&gt;&lt;P&gt;vEndPreviousPeriod: max({&amp;lt;&lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;[Reporting Date]&lt;/SPAN&gt;=,&lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;[Reporting Period Index]&lt;/SPAN&gt;={$(max(&lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;[Reporting Period Index]&lt;/SPAN&gt;)-1)}&amp;gt;} [Reporting Date])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You'll have to select a reporting date or a reporting period index otherwise you simply get the start and end of the second last period.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Apr 2013 16:57:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/help-creating-a-variable/m-p/405969#M151066</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2013-04-26T16:57:33Z</dc:date>
    </item>
    <item>
      <title>Re: help creating a variable</title>
      <link>https://community.qlik.com/t5/QlikView/help-creating-a-variable/m-p/405970#M151067</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks that worked! but i have come into work this morning to find that they have changed their mind! they now want to report on previous calendar month instead on period. &lt;/P&gt;&lt;P&gt;I have the following previous&amp;nbsp; month variable...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vLastMonth = =Month(AddMonths(Date([Reporting Date]),-1))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But i cant seem to get the variable to work in my expression. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum({&amp;lt;[Reporting Week]=, [Reporting Date]={'=$(=date(vLastMonth))'},[Reason Group] = {'Upgrade'}&amp;gt;} [Revenue Loss])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any Ideas?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Apr 2013 08:57:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/help-creating-a-variable/m-p/405970#M151067</guid>
      <dc:creator />
      <dc:date>2013-04-29T08:57:39Z</dc:date>
    </item>
    <item>
      <title>Re: help creating a variable</title>
      <link>https://community.qlik.com/t5/QlikView/help-creating-a-variable/m-p/405971#M151068</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, i have managed to do this now. &lt;/P&gt;&lt;P&gt;thanks &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Apr 2013 11:44:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/help-creating-a-variable/m-p/405971#M151068</guid>
      <dc:creator />
      <dc:date>2013-04-29T11:44:44Z</dc:date>
    </item>
  </channel>
</rss>

