<?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 logic in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-Analysis-logic/m-p/319682#M495428</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Michael.&lt;/P&gt;&lt;P class="b-translate__fulltext__value"&gt;I thought about it. But my task is more difficult.&lt;/P&gt;&lt;P class="b-translate__fulltext__value"&gt;I need to bulid a chart, which shows a difference between current value and last month value.&lt;/P&gt;&lt;P class="b-translate__fulltext__value"&gt;Dimension "Month" is limited (last 6 months). &lt;/P&gt;&lt;P class="b-translate__fulltext__value"&gt;To limit the dimension i'm using calculated dimension &lt;/P&gt;&lt;P class="b-translate__fulltext__value"&gt;=if(Month&amp;gt; MonthStart(Today(), -6), Month)&lt;/P&gt;&lt;P class="b-translate__fulltext__value"&gt;if i use above function in expression, value of "Sep 2011" is null, because it don,t see the value of "Aug 2011".&lt;/P&gt;&lt;P class="b-translate__fulltext__value"&gt;That's why I,m considering set analysis as a solution.&lt;/P&gt;&lt;P class="b-translate__fulltext__value"&gt;It will be correct if I show last 7 month and "Sep 2011" will have not null value. In this case I need to hide "Aug 2011"&lt;/P&gt;&lt;P class="b-translate__fulltext__value"&gt;&lt;/P&gt;&lt;P class="b-translate__fulltext__value"&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 27 Feb 2012 07:03:53 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-02-27T07:03:53Z</dc:date>
    <item>
      <title>Set Analysis logic</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-logic/m-p/319679#M495425</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt; Hi, dear colleagues.&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;Could you help me, please.&lt;/DIV&gt;&lt;DIV&gt;I have a table, which contains 2 fields:&lt;/DIV&gt;&lt;DIV&gt;Month&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Values&lt;/DIV&gt;&lt;DIV&gt;Jan 2012&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 100&lt;/DIV&gt;&lt;DIV&gt;Dec 2011&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 200&lt;/DIV&gt;&lt;DIV&gt;Nov 2011&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 300&lt;/DIV&gt;&lt;DIV&gt;etc.&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;I want to get value of previous month.&lt;/DIV&gt;&lt;DIV&gt;My expression is:&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;&lt;DIV&gt;sum&lt;/DIV&gt;&lt;/SPAN&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-size: 8pt;"&gt;({&amp;lt;Month&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; = {&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;"$(=MonthName(Month, -1&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;))"&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;}&amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Vallue&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;But it works only if 1 month is selected (like Only(Month)) and doesn't work without any selection.&lt;/DIV&gt;&lt;DIV&gt;Is it possible to calculate dimension for each value of dimension "Month"?&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;Thanks a lot.&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 26 Feb 2012 20:30:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-logic/m-p/319679#M495425</guid>
      <dc:creator />
      <dc:date>2012-02-26T20:30:49Z</dc:date>
    </item>
    <item>
      <title>Set Analysis logic</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-logic/m-p/319680#M495426</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Oleg,:&lt;/P&gt;&lt;P&gt;If you're using in in a table/chart where Month is dimension, try function above(), for example:&lt;BR /&gt;above(sum(Value))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 26 Feb 2012 21:11:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-logic/m-p/319680#M495426</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-02-26T21:11:58Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis logic</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-logic/m-p/319681#M495427</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Oleg,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was thinking it could be done a different way.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for example:&amp;nbsp;&amp;nbsp; if you where to add another field in the script which sets a new field to the previous month.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ADDMONTHS([Month],1)&amp;nbsp; AS PrevMonth,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then use this field in your SetAnalysis, ie: SUM( {&amp;lt; [Month] = P(PrevMonth) &amp;gt;} Values)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;that this should work, but preliminary testing (see attachment) did not work.&amp;nbsp; I'm pretty sure this should work and that I need some refinement of the SetAnalysis.&amp;nbsp; I'll keep playing as time permits but someone else may be able to advance this idea in the meantime.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;John.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Feb 2012 00:28:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-logic/m-p/319681#M495427</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-02-27T00:28:54Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis logic</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-logic/m-p/319682#M495428</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Michael.&lt;/P&gt;&lt;P class="b-translate__fulltext__value"&gt;I thought about it. But my task is more difficult.&lt;/P&gt;&lt;P class="b-translate__fulltext__value"&gt;I need to bulid a chart, which shows a difference between current value and last month value.&lt;/P&gt;&lt;P class="b-translate__fulltext__value"&gt;Dimension "Month" is limited (last 6 months). &lt;/P&gt;&lt;P class="b-translate__fulltext__value"&gt;To limit the dimension i'm using calculated dimension &lt;/P&gt;&lt;P class="b-translate__fulltext__value"&gt;=if(Month&amp;gt; MonthStart(Today(), -6), Month)&lt;/P&gt;&lt;P class="b-translate__fulltext__value"&gt;if i use above function in expression, value of "Sep 2011" is null, because it don,t see the value of "Aug 2011".&lt;/P&gt;&lt;P class="b-translate__fulltext__value"&gt;That's why I,m considering set analysis as a solution.&lt;/P&gt;&lt;P class="b-translate__fulltext__value"&gt;It will be correct if I show last 7 month and "Sep 2011" will have not null value. In this case I need to hide "Aug 2011"&lt;/P&gt;&lt;P class="b-translate__fulltext__value"&gt;&lt;/P&gt;&lt;P class="b-translate__fulltext__value"&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Feb 2012 07:03:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-logic/m-p/319682#M495428</guid>
      <dc:creator />
      <dc:date>2012-02-27T07:03:53Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis logic</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-logic/m-p/319683#M495429</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;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Check with this link &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://community.qlik.com/message/195238#195238"&gt;http://community.qlik.com/message/195238&lt;/A&gt;&lt;SPAN&gt; which is similar to yours.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it solves your problem&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Celambarasan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Feb 2012 07:34:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-logic/m-p/319683#M495429</guid>
      <dc:creator>CELAMBARASAN</dc:creator>
      <dc:date>2012-02-27T07:34:27Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis logic</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-logic/m-p/319684#M495430</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks a lot.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It's working.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Correct expression is:&lt;/P&gt;&lt;P&gt;sum(Value) - alt(above(Sum(Value)), FirstMonth)&lt;/P&gt;&lt;P&gt;where FirstMonth is expression:&lt;/P&gt;&lt;P&gt;if(GetSelectedCount(Month) =0,&lt;/P&gt;&lt;P&gt;Sum({&amp;lt;Month={"$(=MonthName(today(), -6))"}&amp;gt;} TOTAL Value),&lt;/P&gt;&lt;P&gt;Sum({&amp;lt;Month={"$(=MonthName(Min(total Month), -1))"}&amp;gt;} TOTAL Value))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"if"-statement makes it working with a selection in a Month field. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Feb 2012 15:09:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-logic/m-p/319684#M495430</guid>
      <dc:creator />
      <dc:date>2012-02-27T15:09:10Z</dc:date>
    </item>
  </channel>
</rss>

