<?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 Info for month -1 and year -1 in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Info-for-month-1-and-year-1/m-p/1597926#M44202</link>
    <description>&lt;P&gt;Hey lads,&lt;/P&gt;&lt;P&gt;i'm in a roadblock with the following thing.&lt;/P&gt;&lt;P&gt;I want to make an analysis of the same data as of today, month -1 and year -1.&lt;/P&gt;&lt;P&gt;The data has columns Year = 2017,2018.... and Month =1,2,3,.....&lt;/P&gt;&lt;P&gt;What i was thinking of doing is to create those variables&lt;/P&gt;&lt;P&gt;vCurrentMonth=month(today())&lt;/P&gt;&lt;P&gt;vPreviousMonth=month(today())-1&lt;/P&gt;&lt;P&gt;vCurrentYear=year(today))&lt;/P&gt;&lt;P&gt;vCurrentYear=year(today))-1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And respectfully use the logic&amp;nbsp;&lt;/P&gt;&lt;P&gt;Current month = sum({$&amp;lt;[Month]={vCurrentMonth},[Year]={vCurrentYear}&amp;gt;}[ThingToSum])&lt;/P&gt;&lt;P&gt;Previous month = sum({$&amp;lt;[Month]={vPreviousMonth},[Year]={vCurrentYear}&amp;gt;}[ThingToSum])&lt;/P&gt;&lt;P&gt;Previous year = sum({$&amp;lt;[Year]={vPreviousYear},[Month]={vCurrentMonth}&amp;gt;}[ThingToSum])&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Naturally, it aint working &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any tips?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thx!&lt;/P&gt;</description>
    <pubDate>Tue, 02 Jul 2019 07:10:14 GMT</pubDate>
    <dc:creator>sdyankov</dc:creator>
    <dc:date>2019-07-02T07:10:14Z</dc:date>
    <item>
      <title>Info for month -1 and year -1</title>
      <link>https://community.qlik.com/t5/App-Development/Info-for-month-1-and-year-1/m-p/1597926#M44202</link>
      <description>&lt;P&gt;Hey lads,&lt;/P&gt;&lt;P&gt;i'm in a roadblock with the following thing.&lt;/P&gt;&lt;P&gt;I want to make an analysis of the same data as of today, month -1 and year -1.&lt;/P&gt;&lt;P&gt;The data has columns Year = 2017,2018.... and Month =1,2,3,.....&lt;/P&gt;&lt;P&gt;What i was thinking of doing is to create those variables&lt;/P&gt;&lt;P&gt;vCurrentMonth=month(today())&lt;/P&gt;&lt;P&gt;vPreviousMonth=month(today())-1&lt;/P&gt;&lt;P&gt;vCurrentYear=year(today))&lt;/P&gt;&lt;P&gt;vCurrentYear=year(today))-1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And respectfully use the logic&amp;nbsp;&lt;/P&gt;&lt;P&gt;Current month = sum({$&amp;lt;[Month]={vCurrentMonth},[Year]={vCurrentYear}&amp;gt;}[ThingToSum])&lt;/P&gt;&lt;P&gt;Previous month = sum({$&amp;lt;[Month]={vPreviousMonth},[Year]={vCurrentYear}&amp;gt;}[ThingToSum])&lt;/P&gt;&lt;P&gt;Previous year = sum({$&amp;lt;[Year]={vPreviousYear},[Month]={vCurrentMonth}&amp;gt;}[ThingToSum])&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Naturally, it aint working &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any tips?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thx!&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jul 2019 07:10:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Info-for-month-1-and-year-1/m-p/1597926#M44202</guid>
      <dc:creator>sdyankov</dc:creator>
      <dc:date>2019-07-02T07:10:14Z</dc:date>
    </item>
    <item>
      <title>Re: Info for month -1 and year -1</title>
      <link>https://community.qlik.com/t5/App-Development/Info-for-month-1-and-year-1/m-p/1597930#M44203</link>
      <description>&lt;P&gt;Try expanding your variables with $ like:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;sum({$&amp;lt;[Month]={&lt;STRONG&gt;$(&lt;/STRONG&gt;vCurrentMonth&lt;STRONG&gt;)&lt;/STRONG&gt;},[Year]={&lt;STRONG&gt;$(&lt;/STRONG&gt;vCurrentYear&lt;STRONG&gt;)&lt;/STRONG&gt;}&amp;gt;}[ThingToSum])&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jul 2019 07:21:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Info-for-month-1-and-year-1/m-p/1597930#M44203</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2019-07-02T07:21:49Z</dc:date>
    </item>
    <item>
      <title>Re: Info for month -1 and year -1</title>
      <link>https://community.qlik.com/t5/App-Development/Info-for-month-1-and-year-1/m-p/1598029#M44212</link>
      <description>&lt;P&gt;for some reason it does not work with the variables.&lt;/P&gt;&lt;P&gt;I've tested the variables in text boxes and they provide the accurate figures for the month number and year number, but when part of the expression they give 0. If i type manually the number of the month, it all works fine&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jul 2019 11:08:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Info-for-month-1-and-year-1/m-p/1598029#M44212</guid>
      <dc:creator>sdyankov</dc:creator>
      <dc:date>2019-07-02T11:08:12Z</dc:date>
    </item>
  </channel>
</rss>

