<?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 expression - question in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-expression-question/m-p/300601#M496477</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 have a problem with a reporting- requirement that keeps coming up in different projects, so I thought maybe one of you would have a great idea, how to solve it... &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/wink.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem is I need to dynamically compare to monthly values in a table, that also contains the dimension month (see screenshot - 3rd column).&lt;/P&gt;&lt;P&gt;I&lt;STRONG&gt; can't use the above() &lt;/STRONG&gt;- function because the previous month is not always displayed in the table (i.e. there is no October in the sample graph)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I could get it to work for with hard - coded month with this formula (2nd expression):&amp;nbsp; &lt;STRONG&gt;sum({$&amp;lt;Month={1}&amp;gt;} Total Value)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It didn't work when I tried to reference the month of the current row with something like this (3rd expression): &lt;STRONG&gt;sum({$&amp;lt;Month={"$(=only(Month)-1)"}&amp;gt;} Total Value)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="problem_set.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/9543_problem_set.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please find attached a qvw that illustrates the problem. I hope someone can give me a hint, how to handle this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in Advance!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Gerald &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 14 Dec 2011 14:05:59 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-12-14T14:05:59Z</dc:date>
    <item>
      <title>Set expression - question</title>
      <link>https://community.qlik.com/t5/QlikView/Set-expression-question/m-p/300601#M496477</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 have a problem with a reporting- requirement that keeps coming up in different projects, so I thought maybe one of you would have a great idea, how to solve it... &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/wink.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem is I need to dynamically compare to monthly values in a table, that also contains the dimension month (see screenshot - 3rd column).&lt;/P&gt;&lt;P&gt;I&lt;STRONG&gt; can't use the above() &lt;/STRONG&gt;- function because the previous month is not always displayed in the table (i.e. there is no October in the sample graph)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I could get it to work for with hard - coded month with this formula (2nd expression):&amp;nbsp; &lt;STRONG&gt;sum({$&amp;lt;Month={1}&amp;gt;} Total Value)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It didn't work when I tried to reference the month of the current row with something like this (3rd expression): &lt;STRONG&gt;sum({$&amp;lt;Month={"$(=only(Month)-1)"}&amp;gt;} Total Value)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="problem_set.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/9543_problem_set.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please find attached a qvw that illustrates the problem. I hope someone can give me a hint, how to handle this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in Advance!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Gerald &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Dec 2011 14:05:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-expression-question/m-p/300601#M496477</guid>
      <dc:creator />
      <dc:date>2011-12-14T14:05:59Z</dc:date>
    </item>
    <item>
      <title>Re: Set expression - question</title>
      <link>https://community.qlik.com/t5/QlikView/Set-expression-question/m-p/300602#M496478</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;try to help..might not be ur solution but i'm tryin to understand what you want to achieved for the end result.&lt;/P&gt;&lt;P&gt;﻿&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Dec 2011 00:30:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-expression-question/m-p/300602#M496478</guid>
      <dc:creator />
      <dc:date>2011-12-15T00:30:26Z</dc:date>
    </item>
    <item>
      <title>Re: Set expression - question</title>
      <link>https://community.qlik.com/t5/QlikView/Set-expression-question/m-p/300603#M496479</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gerald,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this set analysis =sum({$&amp;lt;Month={"$(=max(Month)-1)"}&amp;gt;} Total Value)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sokkorn Cheav&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Dec 2011 01:10:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-expression-question/m-p/300603#M496479</guid>
      <dc:creator>Sokkorn</dc:creator>
      <dc:date>2011-12-15T01:10:53Z</dc:date>
    </item>
    <item>
      <title>Re: Set expression - question</title>
      <link>https://community.qlik.com/t5/QlikView/Set-expression-question/m-p/300604#M496480</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi &lt;/P&gt;&lt;P&gt;please find the attacment&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Dec 2011 05:30:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-expression-question/m-p/300604#M496480</guid>
      <dc:creator>rohit214</dc:creator>
      <dc:date>2011-12-15T05:30:27Z</dc:date>
    </item>
    <item>
      <title>Re: Set expression - question</title>
      <link>https://community.qlik.com/t5/QlikView/Set-expression-question/m-p/300605#M496481</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can consider 2 other ways that are not using SET:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. In LOAD script create another column which contains the precedent month value.&lt;/P&gt;&lt;P&gt;2. Create a secondary disconected TIME table and use:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; " =SUM( IF( Date = Dis_Date, Value ) )" for current month&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; " =SUM( IF( Date = addmonth(Dis_Date,-1), Value ) )" for last month&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Dec 2011 07:38:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-expression-question/m-p/300605#M496481</guid>
      <dc:creator>luciancotea</dc:creator>
      <dc:date>2011-12-15T07:38:28Z</dc:date>
    </item>
    <item>
      <title>Set expression - question</title>
      <link>https://community.qlik.com/t5/QlikView/Set-expression-question/m-p/300606#M496482</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;thanks for all the good ideas &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I haven't found the solution I could use yet:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) I can't use above() because it is only possible when the previous column is also visible in the table&amp;nbsp; (which is not the case for the month 11)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) The approach using the max() - function works if I only have two months, but if I want to display 3 or more months it won't work anymore.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3) I can't us the Load - Skript because the analysis is quite dynamic and I can't forsee all selections.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So is there any way that I could use a set that references a dimension value - the month - of the current row?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Dec 2011 12:52:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-expression-question/m-p/300606#M496482</guid>
      <dc:creator />
      <dc:date>2011-12-15T12:52:23Z</dc:date>
    </item>
    <item>
      <title>Set expression - question</title>
      <link>https://community.qlik.com/t5/QlikView/Set-expression-question/m-p/300607#M496483</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Did you tried my second solution?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; font-size: 12px; color: #636363; font-family: Arial;"&gt;2. Create a secondary disconected TIME table and use:&lt;/P&gt;&lt;P style="background-color: #ffffff; font-size: 12px; color: #636363; font-family: Arial;"&gt;&amp;nbsp;&amp;nbsp; " =SUM( IF( Date = Dis_Date, Value ) )" for current month&lt;/P&gt;&lt;P style="background-color: #ffffff; font-size: 12px; color: #636363; font-family: Arial;"&gt;&amp;nbsp;&amp;nbsp; " =SUM( IF( Date = addmonth(Dis_Date,-1), Value ) )" for last month&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Dec 2011 12:56:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-expression-question/m-p/300607#M496483</guid>
      <dc:creator>luciancotea</dc:creator>
      <dc:date>2011-12-15T12:56:01Z</dc:date>
    </item>
    <item>
      <title>Set expression - question</title>
      <link>https://community.qlik.com/t5/QlikView/Set-expression-question/m-p/300608#M496484</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;in your third expression use code below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;above(sum(Value))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Dec 2011 14:39:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-expression-question/m-p/300608#M496484</guid>
      <dc:creator>SunilChauhan</dc:creator>
      <dc:date>2011-12-15T14:39:45Z</dc:date>
    </item>
    <item>
      <title>Set expression - question</title>
      <link>https://community.qlik.com/t5/QlikView/Set-expression-question/m-p/300609#M496485</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;yes that works indeed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But unfortunately there is to much data and to little Ram in the real customer - qvw, where I need to use this .... ;-(. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Gerald &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Dec 2011 14:46:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-expression-question/m-p/300609#M496485</guid>
      <dc:creator />
      <dc:date>2011-12-15T14:46:01Z</dc:date>
    </item>
    <item>
      <title>Set expression - question</title>
      <link>https://community.qlik.com/t5/QlikView/Set-expression-question/m-p/300610#M496486</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ram is cheap. Offering a solution to a customer is priceless! &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Dec 2011 16:15:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-expression-question/m-p/300610#M496486</guid>
      <dc:creator>luciancotea</dc:creator>
      <dc:date>2011-12-15T16:15:12Z</dc:date>
    </item>
  </channel>
</rss>

