<?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 Analysis with Variable ( Previous month) in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Variable-Previous-month/m-p/830208#M292189</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Won't that give you yesterdays date?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 08 Jul 2015 09:17:36 GMT</pubDate>
    <dc:creator>linusblomberg</dc:creator>
    <dc:date>2015-07-08T09:17:36Z</dc:date>
    <item>
      <title>Set Analysis with Variable ( Previous month)</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Variable-Previous-month/m-p/830198#M292179</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, guys!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;I need to create an expression in straight table summing values&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt; of previous month . &lt;/STRONG&gt;&lt;SPAN style="line-height: 1.5em;"&gt;I've created a variable for previous month: vPrevMonth=Date((Month(Today())-1),'MMM-YY')&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;I try an expression like :Sum({&amp;lt;Vacation_Date={$(vPrevMonth)}&amp;gt;} Days), but it doesnt work.&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333330154419px;"&gt;Vacation_Date format is 'MMM-YY'.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;May be I have a mistake in my syntax?&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Sample application is attached.&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Thank You!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Jul 2015 08:30:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Variable-Previous-month/m-p/830198#M292179</guid>
      <dc:creator />
      <dc:date>2015-07-08T08:30:32Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis with Variable ( Previous month)</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Variable-Previous-month/m-p/830199#M292180</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Vacation_Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={'$(vPrevMonth)'}&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Days&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Jul 2015 08:35:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Variable-Previous-month/m-p/830199#M292180</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-07-08T08:35:10Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis with Variable ( Previous month)</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Variable-Previous-month/m-p/830200#M292181</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Create a additional field in your calendar like:&lt;/P&gt;&lt;P&gt;autonumber(Month_Date) as Month_ID. this will give a list from 1 to ??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then in your set analysis:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum({&amp;lt;Month_ID = {="$(=max(Month_ID)-1)"}&amp;gt;}Days) where the max month_id is the latest month in the data or the latest month selected.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Jul 2015 08:37:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Variable-Previous-month/m-p/830200#M292181</guid>
      <dc:creator>Michiel_QV_Fan</dc:creator>
      <dc:date>2015-07-08T08:37:55Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis with Variable ( Previous month)</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Variable-Previous-month/m-p/830201#M292182</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Few issues I found&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) Your Month_name is having MMM format and vCurMonth is having MMM-YY so your Calculation Dimension is Failing&lt;/P&gt;&lt;P&gt;2) vPreMonth need to be defined as Date((MonthStart(Today())-1),'MMM-YY')&lt;/P&gt;&lt;P&gt;3) Remove = from all your Variables Definitions and use $ sing expansion while calling or using them in charts/tables dimension or expression.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Jul 2015 08:41:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Variable-Previous-month/m-p/830201#M292182</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2015-07-08T08:41:32Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis with Variable ( Previous month)</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Variable-Previous-month/m-p/830202#M292183</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Unfortunately, it's not working, I got zeros as a result&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Jul 2015 08:42:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Variable-Previous-month/m-p/830202#M292183</guid>
      <dc:creator />
      <dc:date>2015-07-08T08:42:14Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis with Variable ( Previous month)</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Variable-Previous-month/m-p/830203#M292184</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The thing is I want to sum values of previous month, meaning before actual current month. I dont need the previous month of selected months&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Jul 2015 08:45:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Variable-Previous-month/m-p/830203#M292184</guid>
      <dc:creator />
      <dc:date>2015-07-08T08:45:44Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis with Variable ( Previous month)</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Variable-Previous-month/m-p/830204#M292185</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There are several things that can be said about your data model. You should look it over.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyway, quick fix:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Variable (note that I removed the "=")&lt;/P&gt;&lt;P&gt;Date((Monthname(Today())-1),'MMM-YY')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Expression&lt;/P&gt;&lt;P&gt;Sum({&amp;lt;Vacation_Date={"$(=$(vPrevMonth))"}&amp;gt;} Days)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tip: Create you variables in the script. i.e let vPrevMonth = '&lt;SPAN style="font-size: 13.3333330154419px;"&gt;Date((Monthname(Today())-1),'MMM-YY')';&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;having a "=" in the variable editor will reduce performance as they are constantly re-evaluated. evaluate your variables when you need them.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would avoid dates in the form of &lt;SPAN style="font-size: 13.3333330154419px;"&gt;MMM-YY. use numeric or integer keys.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Jul 2015 08:45:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Variable-Previous-month/m-p/830204#M292185</guid>
      <dc:creator>linusblomberg</dc:creator>
      <dc:date>2015-07-08T08:45:55Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis with Variable ( Previous month)</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Variable-Previous-month/m-p/830205#M292186</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have you check the date format of the variable with respect to &lt;SPAN style="color: #800000; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 10.6666669845581px;"&gt;Vacation_Date &lt;SPAN style="color: #000000; font-size: 13.3333330154419px;"&gt;format?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Jul 2015 08:53:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Variable-Previous-month/m-p/830205#M292186</guid>
      <dc:creator>senpradip007</dc:creator>
      <dc:date>2015-07-08T08:53:00Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis with Variable ( Previous month)</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Variable-Previous-month/m-p/830206#M292187</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes the variable doesn't work as the variable produce "Jan-00". &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Jul 2015 08:57:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Variable-Previous-month/m-p/830206#M292187</guid>
      <dc:creator>linusblomberg</dc:creator>
      <dc:date>2015-07-08T08:57:28Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis with Variable ( Previous month)</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Variable-Previous-month/m-p/830207#M292188</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;vPrevMonth should be as follows&lt;/P&gt;&lt;P&gt;=Date((Today()-1),'MMM-YY')&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Jul 2015 08:58:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Variable-Previous-month/m-p/830207#M292188</guid>
      <dc:creator>sasiparupudi1</dc:creator>
      <dc:date>2015-07-08T08:58:08Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis with Variable ( Previous month)</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Variable-Previous-month/m-p/830208#M292189</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Won't that give you yesterdays date?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Jul 2015 09:17:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Variable-Previous-month/m-p/830208#M292189</guid>
      <dc:creator>linusblomberg</dc:creator>
      <dc:date>2015-07-08T09:17:36Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis with Variable ( Previous month)</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Variable-Previous-month/m-p/830209#M292190</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yeah sorry, It should be&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Date(AddMonths(Today(),-1),'MMM-YY')&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Jul 2015 09:22:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Variable-Previous-month/m-p/830209#M292190</guid>
      <dc:creator>sasiparupudi1</dc:creator>
      <dc:date>2015-07-08T09:22:28Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis with Variable ( Previous month)</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Variable-Previous-month/m-p/830210#M292191</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Diane, that is exactly what this Month_ID solution does,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;with the bonus that if you select a different month it will show the month before that month.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Jul 2015 09:29:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Variable-Previous-month/m-p/830210#M292191</guid>
      <dc:creator>Michiel_QV_Fan</dc:creator>
      <dc:date>2015-07-08T09:29:42Z</dc:date>
    </item>
  </channel>
</rss>

