<?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 Qlik Sense: Load Year &amp; Month Variables in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Qlik-Sense-Load-Year-Month-Variables/m-p/720942#M10491</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm trying to use a script (which I've successfully implemented with QlikView) in Qlik Sense. Basically I need to store a few variables for Year and Month (current, previous, etc). Here's the script I'm using:&lt;/P&gt;&lt;P&gt;LET vYearCurrent = Year(Today());&lt;/P&gt;&lt;P&gt;LET vYearPrevious = Year(Today())-1;&lt;/P&gt;&lt;P&gt;LET vYearPreviousX2 = Year(Today())-2;&lt;/P&gt;&lt;P&gt;LET vMonthCurrent = Month(Today());&lt;/P&gt;&lt;P&gt;LET vMonthPrevious = Month(Today())-1;&lt;/P&gt;&lt;P&gt;LET vMonthPreviousX2 = Month(Today())-2;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For some reason Sense stores "Sep" for the value of vMonthCurrent but "8" for the value of vMonthPrevious. As a result I'm only able to use the vMonthCurrent variable in my visualization and not the vMonthPrevious variable. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas how to get Sense to &lt;SPAN style="text-decoration: underline;"&gt;not&lt;/SPAN&gt; store the vMonthPrevious variable value as numeric?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 29 Sep 2014 18:47:01 GMT</pubDate>
    <dc:creator>jcampbell</dc:creator>
    <dc:date>2014-09-29T18:47:01Z</dc:date>
    <item>
      <title>Qlik Sense: Load Year &amp; Month Variables</title>
      <link>https://community.qlik.com/t5/App-Development/Qlik-Sense-Load-Year-Month-Variables/m-p/720942#M10491</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm trying to use a script (which I've successfully implemented with QlikView) in Qlik Sense. Basically I need to store a few variables for Year and Month (current, previous, etc). Here's the script I'm using:&lt;/P&gt;&lt;P&gt;LET vYearCurrent = Year(Today());&lt;/P&gt;&lt;P&gt;LET vYearPrevious = Year(Today())-1;&lt;/P&gt;&lt;P&gt;LET vYearPreviousX2 = Year(Today())-2;&lt;/P&gt;&lt;P&gt;LET vMonthCurrent = Month(Today());&lt;/P&gt;&lt;P&gt;LET vMonthPrevious = Month(Today())-1;&lt;/P&gt;&lt;P&gt;LET vMonthPreviousX2 = Month(Today())-2;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For some reason Sense stores "Sep" for the value of vMonthCurrent but "8" for the value of vMonthPrevious. As a result I'm only able to use the vMonthCurrent variable in my visualization and not the vMonthPrevious variable. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas how to get Sense to &lt;SPAN style="text-decoration: underline;"&gt;not&lt;/SPAN&gt; store the vMonthPrevious variable value as numeric?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Sep 2014 18:47:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Qlik-Sense-Load-Year-Month-Variables/m-p/720942#M10491</guid>
      <dc:creator>jcampbell</dc:creator>
      <dc:date>2014-09-29T18:47:01Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik Sense: Load Year &amp; Month Variables</title>
      <link>https://community.qlik.com/t5/App-Development/Qlik-Sense-Load-Year-Month-Variables/m-p/720943#M10492</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;Try something like&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;vMonthPrevious &lt;/SPAN&gt;=month(monthstart(today())-1)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Sep 2014 18:55:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Qlik-Sense-Load-Year-Month-Variables/m-p/720943#M10492</guid>
      <dc:creator />
      <dc:date>2014-09-29T18:55:52Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik Sense: Load Year &amp; Month Variables</title>
      <link>https://community.qlik.com/t5/App-Development/Qlik-Sense-Load-Year-Month-Variables/m-p/720944#M10493</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Once you subtract number it will convert the strings into numbers. for Previousmonth use below..&lt;/P&gt;&lt;P&gt;Month(AddMonths(Today(),-1))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Sep 2014 18:56:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Qlik-Sense-Load-Year-Month-Variables/m-p/720944#M10493</guid>
      <dc:creator>phaneendra_kunc</dc:creator>
      <dc:date>2014-09-29T18:56:43Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik Sense: Load Year &amp; Month Variables</title>
      <link>https://community.qlik.com/t5/App-Development/Qlik-Sense-Load-Year-Month-Variables/m-p/720945#M10494</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That did it. Thanks! Here's the final script:&lt;/P&gt;&lt;P&gt;LET vYearCurrent = Year(Today());&lt;/P&gt;&lt;P&gt;LET vYearPrevious = Year(YearStart(Today())-1);&lt;/P&gt;&lt;P&gt;LET vYearPreviousX2 = Year(YearStart(Today())-2);&lt;/P&gt;&lt;P&gt;LET vMonthCurrent = Month(Today());&lt;/P&gt;&lt;P&gt;LET vMonthPrevious = Month(MonthStart(Today())-1);&lt;/P&gt;&lt;P&gt;LET vMonthPreviousX2 =&amp;nbsp; Month(MonthStart(Today())-2);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Sep 2014 18:59:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Qlik-Sense-Load-Year-Month-Variables/m-p/720945#M10494</guid>
      <dc:creator>jcampbell</dc:creator>
      <dc:date>2014-09-29T18:59:36Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik Sense: Load Year &amp; Month Variables</title>
      <link>https://community.qlik.com/t5/App-Development/Qlik-Sense-Load-Year-Month-Variables/m-p/720946#M10495</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi. Im quite newbie in QlikSense after working in QlikView. I try to use variables but somehow it doesnt work the way i was working in QlikView.&lt;/P&gt;&lt;P&gt;I want to write expression showing sum of sales for previous year&amp;nbsp; but expresion like&lt;/P&gt;&lt;P&gt;Sum(if(YEAR=vYearPrevious,Sales)) doesnt work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How am I supposed to use it? I pasted variables from this discussion to Script and reloaded app.&lt;/P&gt;&lt;P&gt;Thanks in advance for help&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Nov 2015 11:11:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Qlik-Sense-Load-Year-Month-Variables/m-p/720946#M10495</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-11-05T11:11:06Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik Sense: Load Year &amp; Month Variables</title>
      <link>https://community.qlik.com/t5/App-Development/Qlik-Sense-Load-Year-Month-Variables/m-p/720947#M10496</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your expression should be Sum({&amp;lt;[Year]={'$(vYearPrevious)'}&amp;gt;}[Sales]). &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Feb 2016 23:27:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Qlik-Sense-Load-Year-Month-Variables/m-p/720947#M10496</guid>
      <dc:creator>jcampbell</dc:creator>
      <dc:date>2016-02-08T23:27:41Z</dc:date>
    </item>
  </channel>
</rss>

