<?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 Set Analysis - Previous Month Values in Pivot Table in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Previous-Month-Values-in-Pivot-Table/m-p/203653#M60908</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi NMiller,&lt;/P&gt;&lt;P&gt;That doesn't seem to work I still get zero.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;Sum(DollarAmount)&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;works correctly, returning the currently selected month, and every other field in my tables work correctly, just not the date that is contained in SelDate, it is very annoying!&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 01 Oct 2009 15:43:37 GMT</pubDate>
    <dc:creator />
    <dc:date>2009-10-01T15:43:37Z</dc:date>
    <item>
      <title>Set Analysis - Previous Month Values in Pivot Table</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Previous-Month-Values-in-Pivot-Table/m-p/203651#M60906</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I seem to have a problem, i've tried searching the forum and applying previous answers to my problem, but I cannot somehow get any of them to work correctly. I am trying to display the Sum Dollar Total of the&lt;/P&gt;&lt;P&gt;I have a variable SelDate which is a user chosen date with the property 'Always One Selected Value'.&lt;/P&gt;&lt;P&gt;I calculate SelDate at the time of script loading deriving it from ToDate:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;&lt;BR /&gt;FormattedDate:&lt;BR /&gt;LOAD ToDate,&lt;BR /&gt;Date(MonthStart(ToDate), 'MMM YYYY') as SelDate&lt;BR /&gt;RESIDENT DataSet;&lt;BR /&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;This sets every item in the dataset to have a date of the 1st of the respective month and year, eg. 01/01/2009, 01/04/2009.&lt;/P&gt;&lt;P&gt;In my pivot table I am trying to use an expression like this, however it does not appear to work:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;&lt;BR /&gt;Sum({1&amp;lt;SelDate={$(=(AddMonths(SelDate,-1)))}&amp;gt;} DollarAmount)&lt;BR /&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;It just returns dashes, any ideas as to what I'm doing wrong?&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;P&gt;Michael&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Sep 2009 23:32:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Previous-Month-Values-in-Pivot-Table/m-p/203651#M60906</guid>
      <dc:creator />
      <dc:date>2009-09-30T23:32:06Z</dc:date>
    </item>
    <item>
      <title>Set Analysis - Previous Month Values in Pivot Table</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Previous-Month-Values-in-Pivot-Table/m-p/203652#M60907</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try adding quotes around the dollar sign expansion.&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;Sum({1&amp;lt;SelDate={'$(=(AddMonths(SelDate,-1)))'}&amp;gt;} DollarAmount)&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;I tried using AddMonths on a Date format like yours and it works fine.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Sep 2009 23:46:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Previous-Month-Values-in-Pivot-Table/m-p/203652#M60907</guid>
      <dc:creator />
      <dc:date>2009-09-30T23:46:21Z</dc:date>
    </item>
    <item>
      <title>Set Analysis - Previous Month Values in Pivot Table</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Previous-Month-Values-in-Pivot-Table/m-p/203653#M60908</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi NMiller,&lt;/P&gt;&lt;P&gt;That doesn't seem to work I still get zero.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;Sum(DollarAmount)&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;works correctly, returning the currently selected month, and every other field in my tables work correctly, just not the date that is contained in SelDate, it is very annoying!&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Oct 2009 15:43:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Previous-Month-Values-in-Pivot-Table/m-p/203653#M60908</guid>
      <dc:creator />
      <dc:date>2009-10-01T15:43:37Z</dc:date>
    </item>
    <item>
      <title>Set Analysis - Previous Month Values in Pivot Table</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Previous-Month-Values-in-Pivot-Table/m-p/203654#M60909</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&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="padding-left:30px;"&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>Fri, 02 Oct 2009 01:07:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Previous-Month-Values-in-Pivot-Table/m-p/203654#M60909</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2009-10-02T01:07:20Z</dc:date>
    </item>
    <item>
      <title>Set Analysis - Previous Month Values in Pivot Table</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Previous-Month-Values-in-Pivot-Table/m-p/203655#M60910</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Works perfectly, thanks John!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Oct 2009 19:31:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Previous-Month-Values-in-Pivot-Table/m-p/203655#M60910</guid>
      <dc:creator />
      <dc:date>2009-10-02T19:31:47Z</dc:date>
    </item>
  </channel>
</rss>

