<?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 syntax in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-analysis-syntax/m-p/695483#M674953</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, but this still gives a syntax error (red underline).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 17 Jul 2014 11:18:23 GMT</pubDate>
    <dc:creator>martynlloyd</dc:creator>
    <dc:date>2014-07-17T11:18:23Z</dc:date>
    <item>
      <title>Set analysis syntax</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-syntax/m-p/695477#M674947</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have an expression:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;({$&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt;"&gt;&lt;SPAN style="color: #800000;"&gt;Domain&lt;/SPAN&gt;={'Sales'}, &lt;SPAN style="color: #800000;"&gt;[Dealer Type]&lt;/SPAN&gt;={'SSP'}, &lt;SPAN style="color: #800000;"&gt;[KPIID]&lt;/SPAN&gt;={'S10','S11A','S11B'}, &lt;SPAN style="color: #800000;"&gt;KPIYear&lt;/SPAN&gt;={2013, 2014}&amp;gt;} &lt;SPAN style="color: #800000;"&gt;Result&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN style="font-size: 12pt;"&gt;)&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I have a field CurrentYear, and I want to use CurrentYear-1 and CurrentYear instead of the fixed values, please can you help me get the correct syntax?&lt;BR /&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Jul 2014 09:58:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-syntax/m-p/695477#M674947</guid>
      <dc:creator>martynlloyd</dc:creator>
      <dc:date>2014-07-17T09:58:30Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis syntax</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-syntax/m-p/695478#M674948</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;is it a variable? then you can do like this sum({&amp;lt;year={'$(CurrentYear)-1'}&amp;gt;} value)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Jul 2014 10:03:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-syntax/m-p/695478#M674948</guid>
      <dc:creator>michael_maeuser</dc:creator>
      <dc:date>2014-07-17T10:03:10Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis syntax</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-syntax/m-p/695479#M674949</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;vMaxYear=Max(KPIYear)&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;Sum({$&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt;"&gt;&lt;SPAN style="color: #800000;"&gt;Domain&lt;/SPAN&gt;={'Sales'}, &lt;SPAN style="color: #800000;"&gt;[Dealer Type]&lt;/SPAN&gt;={'SSP'}, &lt;SPAN style="color: #800000;"&gt;[KPIID]&lt;/SPAN&gt;={'S10','S11A','S11B'}, &lt;SPAN style="color: #800000;"&gt;KPIYear&lt;/SPAN&gt;={$($(vMaxYear)-1)), $(vMaxYear)}&amp;gt;} &lt;SPAN style="color: #800000;"&gt;Result&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt;"&gt;)&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Jul 2014 10:05:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-syntax/m-p/695479#M674949</guid>
      <dc:creator>senpradip007</dc:creator>
      <dc:date>2014-07-17T10:05:27Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis syntax</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-syntax/m-p/695480#M674950</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1st if there is only one current year this value should be store in a variable not field. so you can use the variable with $(). your case will be Year = { $(CurrentYear) }.&lt;/P&gt;&lt;P&gt;If your current year is a a field for some reason. I think you should use P(). Year = P({$} [Current Year])&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Jul 2014 10:15:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-syntax/m-p/695480#M674950</guid>
      <dc:creator />
      <dc:date>2014-07-17T10:15:31Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis syntax</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-syntax/m-p/695481#M674951</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Martyn,&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;Domain={'Sales'}, [Dealer Type]={'SSP'}, [KPIID]={'S10','S11A','S11B'}, KPIYear={'$(CurrentYear)-1',{'$(CurrentYear)'}}&amp;gt;} Result)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Jul 2014 10:28:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-syntax/m-p/695481#M674951</guid>
      <dc:creator>VishalWaghole</dc:creator>
      <dc:date>2014-07-17T10:28:18Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis syntax</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-syntax/m-p/695482#M674952</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, but this still gives a syntax error (red underline) and only returns the current year.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Jul 2014 11:18:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-syntax/m-p/695482#M674952</guid>
      <dc:creator>martynlloyd</dc:creator>
      <dc:date>2014-07-17T11:18:05Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis syntax</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-syntax/m-p/695483#M674953</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, but this still gives a syntax error (red underline).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Jul 2014 11:18:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-syntax/m-p/695483#M674953</guid>
      <dc:creator>martynlloyd</dc:creator>
      <dc:date>2014-07-17T11:18:23Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis syntax</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-syntax/m-p/695484#M674954</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks everyone, I've solved it by creating two variables: vCurrentYear, vPreviousYear&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum({$&amp;lt;Domain={'Sales'}, [Dealer Type]={'SSP'}, [KPIID]={'S10','S11A','S11B'}, KPIYear={$(vPreviousYear), $(vCurrentYear)}&amp;gt;} Result)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Marty.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Jul 2014 11:22:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-syntax/m-p/695484#M674954</guid>
      <dc:creator>martynlloyd</dc:creator>
      <dc:date>2014-07-17T11:22:19Z</dc:date>
    </item>
  </channel>
</rss>

