<?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: Set Expression Help in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-Expression-Help/m-p/839891#M1010758</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Alexandra, this is the same i was doing but not working.. not able to understand why&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 28 Apr 2015 11:10:12 GMT</pubDate>
    <dc:creator>abhaysingh</dc:creator>
    <dc:date>2015-04-28T11:10:12Z</dc:date>
    <item>
      <title>Set Expression Help</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Expression-Help/m-p/839885#M1010752</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;&lt;/P&gt;&lt;P&gt;i have to show Max Month Sales, previous month sale and previous to previous month sales.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i created 3 variables&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vMaxMonth = max(Month)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /// month value are in number&lt;/P&gt;&lt;P&gt;vlastMonth = Max(Month)-1&lt;/P&gt;&lt;P&gt;vlast2lastMonth = Max(Month)-2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now i am using variable in this way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=sum({&amp;lt; Month = {$(vMaxMonth)}&amp;gt;}sales&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;=sum({&amp;lt; Month = {$(&lt;SPAN style="font-size: 13.3333330154419px;"&gt;vlastMonth &lt;/SPAN&gt;)}&amp;gt;}sales&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please correct me it is not working&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Apr 2015 10:37:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Expression-Help/m-p/839885#M1010752</guid>
      <dc:creator>abhaysingh</dc:creator>
      <dc:date>2015-04-28T10:37:56Z</dc:date>
    </item>
    <item>
      <title>Re: Set Expression Help</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Expression-Help/m-p/839886#M1010753</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this..&lt;/P&gt;&lt;P&gt;vMaxDate=max(Date)&lt;/P&gt;&lt;P&gt;vMaxMonth = month(vMaxDate)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;vlastMonth =addmonths(vMaxDate,-1)&lt;/P&gt;&lt;P&gt;vlast2lastMonth =addmonths(vMaxDate,-2)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I assume there is a Date column&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Apr 2015 10:42:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Expression-Help/m-p/839886#M1010753</guid>
      <dc:creator />
      <dc:date>2015-04-28T10:42:49Z</dc:date>
    </item>
    <item>
      <title>Re: Set Expression Help</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Expression-Help/m-p/839887#M1010754</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;what would be the syntax??&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Apr 2015 10:45:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Expression-Help/m-p/839887#M1010754</guid>
      <dc:creator>abhaysingh</dc:creator>
      <dc:date>2015-04-28T10:45:42Z</dc:date>
    </item>
    <item>
      <title>Re: Set Expression Help</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Expression-Help/m-p/839888#M1010755</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Let the expressions be same.. just change the variable definitions&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Apr 2015 10:49:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Expression-Help/m-p/839888#M1010755</guid>
      <dc:creator />
      <dc:date>2015-04-28T10:49:32Z</dc:date>
    </item>
    <item>
      <title>Re: Set Expression Help</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Expression-Help/m-p/839889#M1010756</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;this worked:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vMonthMax: =max(month)&lt;/P&gt;&lt;P&gt;vMonthMax1: =max(month) - 1&lt;/P&gt;&lt;P&gt;vMonthMax2: =max(month) - 2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum({&amp;lt;month = {$(vMonthMax)}&amp;gt;} sum)&lt;/P&gt;&lt;P&gt;sum({&amp;lt;month = {$(vMonthMax1)}&amp;gt;} sum)&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;sum({&amp;lt;month = {$(vMonthMax2)}&amp;gt;} sum)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Apr 2015 11:07:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Expression-Help/m-p/839889#M1010756</guid>
      <dc:creator />
      <dc:date>2015-04-28T11:07:48Z</dc:date>
    </item>
    <item>
      <title>Re: Set Expression Help</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Expression-Help/m-p/839890#M1010757</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;max month working but last and last 2 last month not working&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Apr 2015 11:08:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Expression-Help/m-p/839890#M1010757</guid>
      <dc:creator>abhaysingh</dc:creator>
      <dc:date>2015-04-28T11:08:58Z</dc:date>
    </item>
    <item>
      <title>Re: Set Expression Help</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Expression-Help/m-p/839891#M1010758</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Alexandra, this is the same i was doing but not working.. not able to understand why&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Apr 2015 11:10:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Expression-Help/m-p/839891#M1010758</guid>
      <dc:creator>abhaysingh</dc:creator>
      <dc:date>2015-04-28T11:10:12Z</dc:date>
    </item>
    <item>
      <title>Re: Set Expression Help</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Expression-Help/m-p/839892#M1010759</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;can you share the sample qvw file? 'cos it worked for me perfectly&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Apr 2015 11:13:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Expression-Help/m-p/839892#M1010759</guid>
      <dc:creator />
      <dc:date>2015-04-28T11:13:51Z</dc:date>
    </item>
    <item>
      <title>Re: Set Expression Help</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Expression-Help/m-p/839893#M1010760</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Abhay,&lt;/P&gt;&lt;P&gt;I think if you change the definition of these variables to&lt;/P&gt;&lt;P&gt;vlastMonth =month(addmonths(vMaxDate,-1))&lt;/P&gt;&lt;P&gt;vlast2lastMonth =month(addmonths(vMaxDate,-2))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;..then it will work. Just try and let me know&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Dawar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Apr 2015 11:19:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Expression-Help/m-p/839893#M1010760</guid>
      <dc:creator />
      <dc:date>2015-04-28T11:19:54Z</dc:date>
    </item>
    <item>
      <title>Re: Set Expression Help</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Expression-Help/m-p/839894#M1010761</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Refer the attached application&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You just need to create 2 variables for MinDate and Max Date&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Apr 2015 11:20:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Expression-Help/m-p/839894#M1010761</guid>
      <dc:creator>ankitaag</dc:creator>
      <dc:date>2015-04-28T11:20:32Z</dc:date>
    </item>
    <item>
      <title>Re: Set Expression Help</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Expression-Help/m-p/839895#M1010762</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;/P&gt;&lt;P&gt;Try this but make sure your Date have same format&lt;/P&gt;&lt;P&gt; sum({&amp;lt;Date = {'&amp;gt;=$(=MonthStart(Max(Date), -3))&amp;lt;=$(=MonthEnd(Max(Date)-1))'},Year=,Month=&amp;gt;}Sale)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Apr 2015 11:20:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Expression-Help/m-p/839895#M1010762</guid>
      <dc:creator>er_mohit</dc:creator>
      <dc:date>2015-04-28T11:20:53Z</dc:date>
    </item>
    <item>
      <title>Re: Set Expression Help</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Expression-Help/m-p/839896#M1010763</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Abhay,&lt;/P&gt;&lt;P&gt;note that your Month-Field is dual with e.g. a text "Feb" and a number "2".&lt;BR /&gt;When using it in Set Analysis you can write {Jan,Feb} or {'&amp;lt;3'}. Both with the same result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Therefore you need to convert the result of your Variables into the text again like this:&lt;/P&gt;&lt;P&gt;=month(date#(max(Month),'MM'))&amp;nbsp;&amp;nbsp; or&amp;nbsp;&amp;nbsp; =month(makedate(2000,max(Month),1))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or alternatively you can write your set Statement like this:&lt;/P&gt;&lt;P&gt;=sum({&amp;lt;Month={'&amp;lt;=$(vMaxDate)&amp;gt;=$(vMaxDate)}&amp;gt;}sales) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps&lt;/P&gt;&lt;P&gt;Tobias &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Apr 2015 11:21:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Expression-Help/m-p/839896#M1010763</guid>
      <dc:creator>tobias_klett</dc:creator>
      <dc:date>2015-04-28T11:21:47Z</dc:date>
    </item>
  </channel>
</rss>

