<?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: Calculated Variable in Set Analysis in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Calculated-Variable-in-Set-Analysis/m-p/397559#M148079</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;What answer works for your problem? Is it Johannes answer or my answer? &lt;STRONG&gt;&lt;EM style="color: #808080; font-size: 8pt;"&gt;$(=only(Year)-1&lt;/EM&gt;&lt;/STRONG&gt;) must give you last year if you need last year.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Janzen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 10 Oct 2012 07:35:39 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-10-10T07:35:39Z</dc:date>
    <item>
      <title>Calculated Variable in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Calculated-Variable-in-Set-Analysis/m-p/397554#M148074</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I want to use my calculated variable in a set expression. &lt;/P&gt;&lt;P&gt;Vaiable=&lt;SPAN style="font-size: 8pt;"&gt;&lt;SPAN style="color: #0000ff;"&gt;sum&lt;/SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;OrderPrice&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;*&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;InvoicedSalesQty&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;*&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;RateFactor&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)+&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Net cost 1]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;+&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Net cost 3]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) - &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Total discount amount]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Expression=&lt;SPAN style="color: #0000ff;"&gt;sum&lt;/SPAN&gt;({$&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Year&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; = {&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;$(=only(Year))&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;}&amp;gt;} &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;$(vNetSalesValue)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;This will give me '-' in my calculation.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;I know that this will get a sum sum sum spagetti, but how should my expression looks like instead of &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;$(vNetSalesValue)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt;?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;if i only use = &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;$(vNetSalesValue)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="color: #000000; font-size: 10pt;"&gt; in my expression everything works fine.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Oct 2012 06:53:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculated-Variable-in-Set-Analysis/m-p/397554#M148074</guid>
      <dc:creator>stabben23</dc:creator>
      <dc:date>2012-10-10T06:53:13Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated Variable in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Calculated-Variable-in-Set-Analysis/m-p/397555#M148075</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hm, hard to say without looking at the document but try putting an Aggr() around your &lt;STRONG style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;&lt;EM style="font-size: 8pt; color: #808080;"&gt;$(vNetSalesValue)&lt;/EM&gt;&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;sum({$&amp;lt;Year={$(=only(Year))}&amp;gt;} Aggr($(vNetSalesValue), Dim1, Dim2, etc.))&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Oct 2012 06:56:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculated-Variable-in-Set-Analysis/m-p/397555#M148075</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-10-10T06:56:51Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated Variable in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Calculated-Variable-in-Set-Analysis/m-p/397556#M148076</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;--&amp;gt; Johannes, &lt;/P&gt;&lt;P&gt;Quick, easy and just what i need!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Oct 2012 07:02:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculated-Variable-in-Set-Analysis/m-p/397556#M148076</guid>
      <dc:creator>stabben23</dc:creator>
      <dc:date>2012-10-10T07:02:17Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated Variable in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Calculated-Variable-in-Set-Analysis/m-p/397557#M148077</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;Maybe this one should work. (Untested) I have created 2 variables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vNetSalesValue = OrderPrice*InvoicedSalesQty*RateFactor&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;vNetSalesValue1 = [Net cost 1]+[Net cost 3]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The expression looks like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum({$&amp;lt;Year = {$(=only(Year))}&amp;gt;} $(vNetSalesValue)) &lt;BR /&gt;+sum({$&amp;lt;Year = {$(=only(Year))}&amp;gt;} $(vNetSalesValue1)) &lt;BR /&gt;-sum({$&amp;lt;Year = {$(=only(Year))}&amp;gt;} [Total discount amount])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Janzen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Oct 2012 07:08:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculated-Variable-in-Set-Analysis/m-p/397557#M148077</guid>
      <dc:creator />
      <dc:date>2012-10-10T07:08:39Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated Variable in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Calculated-Variable-in-Set-Analysis/m-p/397558#M148078</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Janzen,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That how i build my expression first (almost) and yes that works. &lt;/P&gt;&lt;P&gt;I was to fast answering Johannes because now &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Expression last year=&lt;SPAN style="color: #0000ff;"&gt;sum&lt;/SPAN&gt;({$&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Year&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; = {&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style="color: #808080; font-size: 8pt;"&gt;$(=only(Year)-1)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;}&amp;gt;} aggr(&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style="color: #808080; font-size: 8pt;"&gt;$(vNetSalesValue),dim)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;)&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;dont behave as i want.,I will get this years value.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;And how to use when i dont have any dimensions? for exampel in a gauge YTD data. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Is $#= whatever combination a way to get the calculated value?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Oct 2012 07:28:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculated-Variable-in-Set-Analysis/m-p/397558#M148078</guid>
      <dc:creator>stabben23</dc:creator>
      <dc:date>2012-10-10T07:28:00Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated Variable in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Calculated-Variable-in-Set-Analysis/m-p/397559#M148079</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;What answer works for your problem? Is it Johannes answer or my answer? &lt;STRONG&gt;&lt;EM style="color: #808080; font-size: 8pt;"&gt;$(=only(Year)-1&lt;/EM&gt;&lt;/STRONG&gt;) must give you last year if you need last year.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Janzen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Oct 2012 07:35:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculated-Variable-in-Set-Analysis/m-p/397559#M148079</guid>
      <dc:creator />
      <dc:date>2012-10-10T07:35:39Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated Variable in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Calculated-Variable-in-Set-Analysis/m-p/397560#M148080</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;Johannes works with &lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;sum&lt;/SPAN&gt;({$&amp;lt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Year&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; = {&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style="color: #808080; font-size: 8pt;"&gt;$(=only(Year))&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;}&amp;gt;} aggr(&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style="color: #808080; font-size: 8pt;"&gt;$(vNetSalesValue),dim,dim)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;)&amp;nbsp; but not for &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style="color: #808080; font-size: 8pt;"&gt;$(=only(Year)-1&lt;/EM&gt;&lt;/STRONG&gt;) vierd.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;your answer will works but i try to avoid that kind of set expressions and instead use variables, if it works?!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Oct 2012 07:47:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculated-Variable-in-Set-Analysis/m-p/397560#M148080</guid>
      <dc:creator>stabben23</dc:creator>
      <dc:date>2012-10-10T07:47:59Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated Variable in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Calculated-Variable-in-Set-Analysis/m-p/397561#M148081</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;IMG __jive_id="23198" class="jive-image" alt="2012-10-10_0954.png" src="https://community.qlik.com/legacyfs/online/23198_2012-10-10_0954.png" /&gt;&lt;/P&gt;&lt;P&gt;this is &lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;sum&lt;/SPAN&gt;({$&amp;lt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Year&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; = {&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style="color: #808080; font-size: 8pt;"&gt;$(=only(Year))&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;}&amp;gt;} aggr(&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style="color: #808080; font-size: 8pt;"&gt;$(vNetSalesValue),dim)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;)&amp;nbsp; and&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;sum&lt;/SPAN&gt;({$&amp;lt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Year&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; = {&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style="color: #808080; font-size: 8pt;"&gt;$(=only(Year))-1&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;}&amp;gt;} aggr(&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style="color: #808080; font-size: 8pt;"&gt;$(vNetSalesValue),dim)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;)&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;all dimenssion value are the same, Total on top is correct.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Oct 2012 08:05:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculated-Variable-in-Set-Analysis/m-p/397561#M148081</guid>
      <dc:creator>stabben23</dc:creator>
      <dc:date>2012-10-10T08:05:52Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated Variable in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Calculated-Variable-in-Set-Analysis/m-p/397562#M148082</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;It should be&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum({$&amp;lt;Year = {$(=only(Year)-1)}&amp;gt;} aggr($(vNetSalesValue),dim))&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-1 should be right after the first closing parenthesis.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Janzen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Oct 2012 08:15:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculated-Variable-in-Set-Analysis/m-p/397562#M148082</guid>
      <dc:creator />
      <dc:date>2012-10-10T08:15:01Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated Variable in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Calculated-Variable-in-Set-Analysis/m-p/397563#M148083</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;sorry, edit the -1 in the answer, it is like this: sum({$&amp;lt;Year = {$(=only(Year)-1)}&amp;gt;} aggr($(vNetSalesValue),dim))&amp;nbsp; in the expression and dont works.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Oct 2012 08:24:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculated-Variable-in-Set-Analysis/m-p/397563#M148083</guid>
      <dc:creator>stabben23</dc:creator>
      <dc:date>2012-10-10T08:24:42Z</dc:date>
    </item>
  </channel>
</rss>

