<?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 Analysis: What am i Doing wrong? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-Analysis-What-am-i-Doing-wrong/m-p/1092276#M928867</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI there&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to apply the Set statement, with the dollar sign expansion, to calculate the previous year's Value but i keep on getting the selected year's Value only. Note Year field is called EYear and is simply the year.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've tried the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;1. =Sum( {$&amp;lt;EYear = {$(=(EYear)-1)}&amp;gt;} Value)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;2. =Sum( {$&amp;lt;EYear = {$(=Only(EYear)-1)}&amp;gt;} Value )&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;3. =Sum( {$&amp;lt;EYear = {"$(=Only(EYear)-1)"}&amp;gt;} Value )&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It doesn't work in a bar chart and it doesn't work in a text box. What am i doing wrong? &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/sad.png" /&gt;&lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/plain.png" /&gt;&lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/confused.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
    <dc:creator />
    <dc:date>2020-11-25T16:16:04Z</dc:date>
    <item>
      <title>Set Analysis: What am i Doing wrong?</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-What-am-i-Doing-wrong/m-p/1092276#M928867</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI there&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to apply the Set statement, with the dollar sign expansion, to calculate the previous year's Value but i keep on getting the selected year's Value only. Note Year field is called EYear and is simply the year.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've tried the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;1. =Sum( {$&amp;lt;EYear = {$(=(EYear)-1)}&amp;gt;} Value)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;2. =Sum( {$&amp;lt;EYear = {$(=Only(EYear)-1)}&amp;gt;} Value )&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;3. =Sum( {$&amp;lt;EYear = {"$(=Only(EYear)-1)"}&amp;gt;} Value )&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It doesn't work in a bar chart and it doesn't work in a text box. What am i doing wrong? &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/sad.png" /&gt;&lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/plain.png" /&gt;&lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/confused.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-What-am-i-Doing-wrong/m-p/1092276#M928867</guid>
      <dc:creator />
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis: What am i Doing wrong?</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-What-am-i-Doing-wrong/m-p/1092277#M928868</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;may be this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Sum( {$&amp;lt;EYear = {$(=Max(EYear)-1)}&amp;gt;} Value)&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Mar 2016 07:04:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-What-am-i-Doing-wrong/m-p/1092277#M928868</guid>
      <dc:creator>arulsettu</dc:creator>
      <dc:date>2016-03-30T07:04:36Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis: What am i Doing wrong?</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-What-am-i-Doing-wrong/m-p/1092278#M928869</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;A _jive_internal="true" href="https://community.qlik.com/people/ClintonR"&gt;clinton reddy&lt;/A&gt;&lt;/P&gt;&lt;P&gt;try this expression&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #800000;"&gt;&lt;STRONG&gt;=Sum( {$&amp;lt;EYear = &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000;"&gt;&lt;STRONG&gt;{"=$(=max(EYear)-1)"}&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000;"&gt;&lt;STRONG&gt;Value )&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;hope this help you&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards&lt;/P&gt;&lt;P&gt;Ahmar Ansari&lt;/P&gt;&lt;P&gt;&lt;EM style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Mar 2016 07:08:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-What-am-i-Doing-wrong/m-p/1092278#M928869</guid>
      <dc:creator>ahmar811</dc:creator>
      <dc:date>2016-03-30T07:08:36Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis: What am i Doing wrong?</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-What-am-i-Doing-wrong/m-p/1092279#M928870</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;&lt;EM style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;=Sum( {$&amp;lt;EYear = {"$(=&lt;STRONG&gt;max&lt;/STRONG&gt;(EYear)-1)"}&amp;gt;} Value)&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Mar 2016 07:10:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-What-am-i-Doing-wrong/m-p/1092279#M928870</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2016-03-30T07:10:32Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis: What am i Doing wrong?</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-What-am-i-Doing-wrong/m-p/1092280#M928871</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;chk dis&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum({$Eyear={$(=Max(Eyear)-1)}&amp;gt;}value)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Mar 2016 07:31:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-What-am-i-Doing-wrong/m-p/1092280#M928871</guid>
      <dc:creator>Chanty4u</dc:creator>
      <dc:date>2016-03-30T07:31:18Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis: What am i Doing wrong?</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-What-am-i-Doing-wrong/m-p/1092281#M928872</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The second and third look like they should work. Please post a small qlikview document that demonstrates the problem.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Mar 2016 07:51:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-What-am-i-Doing-wrong/m-p/1092281#M928872</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2016-03-30T07:51:32Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis: What am i Doing wrong?</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-What-am-i-Doing-wrong/m-p/1092282#M928873</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI all&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the responses. See attached a Qlik document, Excel file and screenshot.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've added fields&lt;STRONG&gt; (A) "Date" and "Sales"&lt;/STRONG&gt; exactly equal to &lt;STRONG&gt;(B) "EYear" and "Value".&lt;/STRONG&gt; The result is (A) partially works and (B) does not.... why?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I use {1}, I can select anywhere and get the Sales Total for the selected Year - not the Total Sales across all years. Is this expected?&lt;/P&gt;&lt;P&gt;When I use {$} I have to make the "Year" selection to get the required result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Syntax and Results are exceptionally confusing. Imo, the responses confirm this, that is, there are little technical differences in each approach. I've spent 6+hours on this and with standard excel Pivot tables it takes literally seconds... so frustrating!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Mar 2016 09:21:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-What-am-i-Doing-wrong/m-p/1092282#M928873</guid>
      <dc:creator />
      <dc:date>2016-03-30T09:21:23Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis: What am i Doing wrong?</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-What-am-i-Doing-wrong/m-p/1092283#M928874</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do you have a sample you can share? As Gysbert pointed out that the last two expression should give you previous year data for value&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Mar 2016 09:28:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-What-am-i-Doing-wrong/m-p/1092283#M928874</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-03-30T09:28:03Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis: What am i Doing wrong?</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-What-am-i-Doing-wrong/m-p/1092284#M928875</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Gystbert&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've tried all the responses. Whenever I use EYear though my charts do not change, i.e. current and previous year result is equal.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"Year" seems to be playing some role in the outputs. As soon as i change Year to "EYear" nothing works, i.e. i get the same values in each graph - not different.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Mar 2016 09:30:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-What-am-i-Doing-wrong/m-p/1092284#M928875</guid>
      <dc:creator />
      <dc:date>2016-03-30T09:30:41Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis: What am i Doing wrong?</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-What-am-i-Doing-wrong/m-p/1092285#M928876</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In fact, &lt;STRONG&gt;ALL three&lt;/STRONG&gt; expressions should work fine when a &lt;STRONG&gt;single value is selected&lt;/STRONG&gt; from EYear. If that is not working, most probably your EYear field values are not simple numeric like, 2012, 2013,... rather with some text representation like FY2012, FY2013... or so. If you could post a sample data set, the issue could be looked into and resolved.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Mar 2016 09:46:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-What-am-i-Doing-wrong/m-p/1092285#M928876</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2016-03-30T09:46:09Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis: What am i Doing wrong?</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-What-am-i-Doing-wrong/m-p/1092286#M928877</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;EM style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;=Sum( {$&amp;lt;EYear = {"$(=&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;max&lt;/STRONG&gt;(EYear)-1)"}&amp;gt;} Value)&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Mar 2016 10:09:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-What-am-i-Doing-wrong/m-p/1092286#M928877</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-03-30T10:09:51Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis: What am i Doing wrong?</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-What-am-i-Doing-wrong/m-p/1092287#M928878</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That's because EYear and Eyear are two different fields to Qlikview. Make sure to use the exact case sensitive file name.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Mar 2016 10:17:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-What-am-i-Doing-wrong/m-p/1092287#M928878</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2016-03-30T10:17:42Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis: What am i Doing wrong?</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-What-am-i-Doing-wrong/m-p/1092288#M928879</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gysbert&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You are correct. I checked the field names and i was using "EYear" and should have used "Eyear".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm so dumb and embarrassed. Sorry for wasting everyone's time. I appreciate all the quick responses!&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-users/179697"&gt;kush14101987&lt;/A&gt;‌ &lt;A href="https://community.qlik.com/qlik-users/142462"&gt;arulsettu&lt;/A&gt;‌ &lt;A href="https://community.qlik.com/qlik-users/203939"&gt;ahmar811&lt;/A&gt;‌ &lt;A href="https://community.qlik.com/qlik-users/215052"&gt;chanty4u&lt;/A&gt;‌ @sunnyT &lt;A href="https://community.qlik.com/qlik-users/26418"&gt;tresesco&lt;/A&gt;‌ &lt;A href="https://community.qlik.com/qlik-users/50458"&gt;prashantsha&lt;/A&gt;‌&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Mar 2016 10:28:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-What-am-i-Doing-wrong/m-p/1092288#M928879</guid>
      <dc:creator />
      <dc:date>2016-03-30T10:28:42Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis: What am i Doing wrong?</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-What-am-i-Doing-wrong/m-p/1092289#M928880</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ps. I was wondering why the field name was accepted...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I added the field name to a text box: =EYear. It showed 'Bad field name ' whereas in the&amp;nbsp; Set expression i created this was not indicated. Perhaps this helps someone oneday&lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/blush.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Mar 2016 10:34:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-What-am-i-Doing-wrong/m-p/1092289#M928880</guid>
      <dc:creator />
      <dc:date>2016-03-30T10:34:59Z</dc:date>
    </item>
  </channel>
</rss>

