<?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 from the same field in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-analysis-from-the-same-field/m-p/805817#M471899</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;so, did it work for you?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 13 Feb 2015 20:53:40 GMT</pubDate>
    <dc:creator>Oleg_Troyansky</dc:creator>
    <dc:date>2015-02-13T20:53:40Z</dc:date>
    <item>
      <title>Set analysis from the same field</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-from-the-same-field/m-p/805810#M471892</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;I'm trying to set something on a table chart that uses an equation that pulls from a previous month/year id:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; =(sum({$&amp;lt;SNAPSHOT_MONTH_ID = {SNAPSHOT_MONTH_ID}-1&amp;gt;}, MembershipFlag))/(sum(MembershipFlag))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to divide that 2nd snapshot_month_id by the first one. I think my set analysis is wrong though. I simply want to subtract 1 from the current month ID. Is there a way to do this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Joe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Feb 2015 20:41:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-from-the-same-field/m-p/805810#M471892</guid>
      <dc:creator />
      <dc:date>2015-02-13T20:41:35Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis from the same field</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-from-the-same-field/m-p/805811#M471893</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hmmm, it's unclear what do you mean by "previous" Month - compared to the highest Month available, or compared to the Month in the data... The following example filters the data for the previous month compared to the highest available month:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;=(sum({$&amp;lt;SNAPSHOT_MONTH_ID = {$(=max(SNAPSHOT_MONTH_ID)-1)}&amp;gt;}&amp;nbsp; MembershipFlag)) /(sum(MembershipFlag))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Now, this is assuming that all Months are numbered sequentially, so the difference between Dec 2014 and Jan 2015 is one - right?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cheers,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Oleg Troyansky&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Come and learn Set Analysis and Advanced Aggregation with me at &lt;STRONG&gt;www.masterssummit.com&lt;/STRONG&gt; - take your QlikView skills to the next level!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Feb 2015 20:48:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-from-the-same-field/m-p/805811#M471893</guid>
      <dc:creator>Oleg_Troyansky</dc:creator>
      <dc:date>2015-02-13T20:48:32Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis from the same field</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-from-the-same-field/m-p/805812#M471894</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What is the dimension of your table? If it is SNAPSHOT_MONTH_ID, then you would need to use RangeSum(Above(...)) function, if not then you can try this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;=(sum({$&amp;lt;SNAPSHOT_MONTH_ID = {'$(=MonthName(AddMonths(Date(Max(SNAPSHOT_MONTH_ID)),-1))'}&amp;gt;} MembershipFlag))/(Sum(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;{$&amp;lt;SNAPSHOT_MONTH_ID = {'$(=MonthName(Date(Max(SNAPSHOT_MONTH_ID)))'}&amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt; &lt;/SPAN&gt;MembershipFlag))&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;This is all assuming that your &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;SNAPSHOT_MONTH_ID is created in the script using the function MonthName()&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;S&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Feb 2015 20:50:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-from-the-same-field/m-p/805812#M471894</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-02-13T20:50:14Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis from the same field</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-from-the-same-field/m-p/805813#M471895</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;can u provide sample?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Feb 2015 20:50:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-from-the-same-field/m-p/805813#M471895</guid>
      <dc:creator>Frank_Hartmann</dc:creator>
      <dc:date>2015-02-13T20:50:35Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis from the same field</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-from-the-same-field/m-p/805814#M471896</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, exactly.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Feb 2015 20:51:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-from-the-same-field/m-p/805814#M471896</guid>
      <dc:creator />
      <dc:date>2015-02-13T20:51:48Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis from the same field</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-from-the-same-field/m-p/805815#M471897</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The month ids are literally date#s like 201401, 201402, 201403... you get the picture.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Feb 2015 20:53:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-from-the-same-field/m-p/805815#M471897</guid>
      <dc:creator />
      <dc:date>2015-02-13T20:53:14Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis from the same field</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-from-the-same-field/m-p/805816#M471898</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There is a syntax error, it should be rather:&lt;BR /&gt; =(sum({$&amp;lt;SNAPSHOT_MONTH_ID = {"SNAPSHOT_MONTH_ID-1"}&amp;gt;}, MembershipFlag))/(sum(MembershipFlag))&lt;/P&gt;&lt;P&gt;But there is a bigger problem.&amp;nbsp; If SNAPSHOT_MONTH_ID is a chart dimension, it's not going to work because set evaluates all the selected data, not per chart row.&amp;nbsp; You probably need to use before() or above() function, depending on your table type.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Feb 2015 20:53:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-from-the-same-field/m-p/805816#M471898</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-02-13T20:53:29Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis from the same field</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-from-the-same-field/m-p/805817#M471899</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;so, did it work for you?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Feb 2015 20:53:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-from-the-same-field/m-p/805817#M471899</guid>
      <dc:creator>Oleg_Troyansky</dc:creator>
      <dc:date>2015-02-13T20:53:40Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis from the same field</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-from-the-same-field/m-p/805818#M471900</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It did not. It's coming up as 0 for that sum.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Feb 2015 20:58:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-from-the-same-field/m-p/805818#M471900</guid>
      <dc:creator />
      <dc:date>2015-02-13T20:58:00Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis from the same field</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-from-the-same-field/m-p/805819#M471901</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What is your dimension, Like I said and as also pointed by &lt;STRONG style="font-size: 11.6999998092651px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;A href="https://community.qlik.com/people/msolomov"&gt;msolomov&lt;/A&gt;&lt;/STRONG&gt;, you will need above or below function if your dimension is &lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;SNAPSHOT_MONTH_ID&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;S&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Feb 2015 20:59:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-from-the-same-field/m-p/805819#M471901</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-02-13T20:59:55Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis from the same field</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-from-the-same-field/m-p/805820#M471902</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, the above function worked like a charm.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Joe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Feb 2015 21:10:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-from-the-same-field/m-p/805820#M471902</guid>
      <dc:creator />
      <dc:date>2015-02-13T21:10:41Z</dc:date>
    </item>
  </channel>
</rss>

