<?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: Selected Month vs Previous Month in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Selected-Month-vs-Previous-Month/m-p/392172#M490449</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Getcurrentselection appears to list in words everything that is currently selected (like a current selection box). The problem is this lists everything and I am only concerned about what date I am filtered on and displaying the previous month. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 08 Oct 2012 16:53:55 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-10-08T16:53:55Z</dc:date>
    <item>
      <title>Selected Month vs Previous Month</title>
      <link>https://community.qlik.com/t5/QlikView/Selected-Month-vs-Previous-Month/m-p/392170#M490447</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying create an expression which calculated the difference between the selected month's costs and the one preceeding it. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below is an explanation of my key fields:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;[Charge Rate] - Column with spend I am trying to sum&lt;/LI&gt;&lt;LI&gt;[Data Feed Date] - Date formatted as 8/1/2012 12:00 AM&lt;/LI&gt;&lt;LI&gt;[Data Feed Month] - Date formatted as Aug 2012&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I do not want to be tied to the most recent month (I want to be able to select which month I am viewing). I was able to create a label using the following formula (=AddMonths([Data Feed Month],-1)).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried applying this to my expression but it is not working. (sum({&amp;lt;[Data Feed Month]={'=AddMonths([Data Feed Month],-1)'}&amp;gt;}[Charge Rate]))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help would be greatly appreciated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Oct 2012 16:12:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Selected-Month-vs-Previous-Month/m-p/392170#M490447</guid>
      <dc:creator />
      <dc:date>2012-10-08T16:12:47Z</dc:date>
    </item>
    <item>
      <title>Re: Selected Month vs Previous Month</title>
      <link>https://community.qlik.com/t5/QlikView/Selected-Month-vs-Previous-Month/m-p/392171#M490448</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have you tried using the function "GetCurrentSelection" or "GetCurrentField"?&amp;nbsp; I think you need to use GetCurrentSelection, on this.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Give it a try and let me know...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Nate&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Oct 2012 16:46:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Selected-Month-vs-Previous-Month/m-p/392171#M490448</guid>
      <dc:creator>hallquist_nate</dc:creator>
      <dc:date>2012-10-08T16:46:16Z</dc:date>
    </item>
    <item>
      <title>Re: Selected Month vs Previous Month</title>
      <link>https://community.qlik.com/t5/QlikView/Selected-Month-vs-Previous-Month/m-p/392172#M490449</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Getcurrentselection appears to list in words everything that is currently selected (like a current selection box). The problem is this lists everything and I am only concerned about what date I am filtered on and displaying the previous month. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Oct 2012 16:53:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Selected-Month-vs-Previous-Month/m-p/392172#M490449</guid>
      <dc:creator />
      <dc:date>2012-10-08T16:53:55Z</dc:date>
    </item>
    <item>
      <title>Re: Selected Month vs Previous Month</title>
      <link>https://community.qlik.com/t5/QlikView/Selected-Month-vs-Previous-Month/m-p/392173#M490450</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Take a look at GetFieldSelections.&amp;nbsp; That might be what you are looking for.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also use this formula...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(Sum({$&amp;lt; BookedYear={$(=Max(BookedYear)-1)}&amp;gt;}&amp;nbsp; (ORDERED_QUANTITY*UNIT_SELLING_PRICE)))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this case, you have to force the user to select a year, but you can do that by using the Conditional Expression so that the expression won't calculate unless a dimension value is chosen.&amp;nbsp;&amp;nbsp; I avoided that by setting this tab to select Current year when activated.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Will this suffice?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Oct 2012 17:05:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Selected-Month-vs-Previous-Month/m-p/392173#M490450</guid>
      <dc:creator>hallquist_nate</dc:creator>
      <dc:date>2012-10-08T17:05:34Z</dc:date>
    </item>
    <item>
      <title>Re: Selected Month vs Previous Month</title>
      <link>https://community.qlik.com/t5/QlikView/Selected-Month-vs-Previous-Month/m-p/392174#M490451</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I found the solution from another discussion thread. It appears I needed to format as a date for it to work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below is the solution and the explanation from the other thread&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(Sum({&amp;lt;[Data Feed Month]={"$(=date(AddMonths([Data Feed Month],0),'MMM YYYY'))"}&amp;gt;} [Charge Rate]))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background-color: #f5f5f5; color: #737373; font-family: Arial;"&gt;You need to format the SelDate after you subtract the month. It doesn't preserve your special formatting, and is doing more of a text comparison than a numeric comparison. Also, once you do format it, you're going to have to put it in quotes or QV will probably get confused. So I'm guessing that this would work:&lt;/P&gt;&lt;P style="background-color: #f5f5f5; padding: 0 0 0 30px; color: #737373; font-family: Arial;"&gt;Sum({1&amp;lt;SelDate={"$(=date(AddMonths(SelDate,-1),'MMM YYYY'))"}&amp;gt;} DollarAmount)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Oct 2012 17:28:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Selected-Month-vs-Previous-Month/m-p/392174#M490451</guid>
      <dc:creator />
      <dc:date>2012-10-08T17:28:53Z</dc:date>
    </item>
  </channel>
</rss>

