<?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 Expression with Variable minus one in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-Expression-with-Variable-minus-one/m-p/503387#M481644</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Might need to remove the double parentheses and quote the expression:&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;"&gt;Sum({&amp;lt;Date.Year = {'$(=vCurentYear-1)'}, Date.WeekNum = &amp;gt;} InvoiceTrans.Quantity)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&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;"&gt;Jonathan&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 02 Oct 2013 14:03:27 GMT</pubDate>
    <dc:creator>jonathandienst</dc:creator>
    <dc:date>2013-10-02T14:03:27Z</dc:date>
    <item>
      <title>Set Expression with Variable minus one</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Expression-with-Variable-minus-one/m-p/503383#M481640</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 am trying to create a set analysis for an expression that have a variable that I want to take minus 1 with. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have the following expression in a bar chart that works fine. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Sum({&amp;lt;Date.Year={$(vCurrentYear)},Date.WeekNum=&amp;gt;} InvoiceTrans.Quantity)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to add a line chart to the same chart with the sum for CurrentYear minus 1. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have written this expression. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Sum({&amp;lt;Date.Year={$(vCurentYear-1)},Date.WeekNum=&amp;gt;}InvoiceTrans.Quantity)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This does not work due to the connotation in the set expression for year -1. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I couldnt find any helpful info at the website. So I wonder if anyone knows how this set expression should be writte to display data for the graph?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for any help. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//Fredrik&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Oct 2013 13:36:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Expression-with-Variable-minus-one/m-p/503383#M481640</guid>
      <dc:creator />
      <dc:date>2013-10-02T13:36:38Z</dc:date>
    </item>
    <item>
      <title>Re: Set Expression with Variable minus one</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Expression-with-Variable-minus-one/m-p/503384#M481641</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;change to $(vCurentYear)-1 within your expression&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Oct 2013 13:51:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Expression-with-Variable-minus-one/m-p/503384#M481641</guid>
      <dc:creator>omyahamburg</dc:creator>
      <dc:date>2013-10-02T13:51:11Z</dc:date>
    </item>
    <item>
      <title>Re: Set Expression with Variable minus one</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Expression-with-Variable-minus-one/m-p/503385#M481642</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 this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Sum({&amp;lt;Date.Year={$((=vCurentYear-1))},Date.WeekNum=&amp;gt;}InvoiceTrans.Quantity)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jagan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Oct 2013 13:56:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Expression-with-Variable-minus-one/m-p/503385#M481642</guid>
      <dc:creator>jagan</dc:creator>
      <dc:date>2013-10-02T13:56:30Z</dc:date>
    </item>
    <item>
      <title>Re: Set Expression with Variable minus one</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Expression-with-Variable-minus-one/m-p/503386#M481643</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Sum({&amp;lt;Date.Year={$(vCurentYear)-1},Date.WeekNum=&amp;gt;}InvoiceTrans.Quantity)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or create a new variable "vPreviousYear" and set it equal to =max(Year)-1&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Oct 2013 14:01:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Expression-with-Variable-minus-one/m-p/503386#M481643</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-10-02T14:01:44Z</dc:date>
    </item>
    <item>
      <title>Re: Set Expression with Variable minus one</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Expression-with-Variable-minus-one/m-p/503387#M481644</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Might need to remove the double parentheses and quote the expression:&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;"&gt;Sum({&amp;lt;Date.Year = {'$(=vCurentYear-1)'}, Date.WeekNum = &amp;gt;} InvoiceTrans.Quantity)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&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;"&gt;Jonathan&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Oct 2013 14:03:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Expression-with-Variable-minus-one/m-p/503387#M481644</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2013-10-02T14:03:27Z</dc:date>
    </item>
    <item>
      <title>Re: Set Expression with Variable minus one</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Expression-with-Variable-minus-one/m-p/503388#M481645</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you everyone for the input. Actuly non of the answers are working. I thought about adding a new variable at the start but wanted to limit the number of variables I have in the document. So I wanted to create the filter in the set analysis instead. It is for a demo so I will create the new variable for this specifically. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Set analysis is great but I often find that you spend time trying to get the connotation right.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Oct 2013 14:41:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Expression-with-Variable-minus-one/m-p/503388#M481645</guid>
      <dc:creator />
      <dc:date>2013-10-02T14:41:35Z</dc:date>
    </item>
  </channel>
</rss>

