<?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 statement issue in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-Analysis-statement-issue/m-p/794209#M280714</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Dear Max,&lt;/P&gt;&lt;P&gt;My understanding was to ignore the current selection for particular field we have to add statements like &lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Invoice Year]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;=, . By doing this it will take current selection for everything except invoice year which is being set to previous year based on the calculation&amp;nbsp; &lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Invoice 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;$(= year(VStartInvDate) - 1)}. &lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;STRONG&gt;That's the reason&lt;/STRONG&gt; for nullifying and chances are i may be wrong in what i understand as i am quite new to QV. I did try like you suggested and am getting the same blank results. Do you believe it is a data format issue with [Invoice Year] and the calculation &lt;STRONG&gt;&lt;EM style="color: #808080;"&gt;$(= year(VStartInvDate) - 1) ???&lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 29 Dec 2014 13:47:43 GMT</pubDate>
    <dc:creator>raghuvr33</dc:creator>
    <dc:date>2014-12-29T13:47:43Z</dc:date>
    <item>
      <title>Set Analysis statement issue</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-statement-issue/m-p/794204#M280709</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Hi All,&lt;/P&gt;&lt;P&gt;I am not sure what is wrong with the set statement below. I am trying to sum [invoice net price] for previous year than the selected date keeping all other current selections same. The [invoice year] has been generated in the script using year(invoice_date) statement. I tried and displayed ( [invoice year]&amp;nbsp; -1 ) and &lt;STRONG&gt;&lt;SPAN style="color: #808080; font-size: 10pt;"&gt;$(= year(VStartInvDate) - 1)&lt;/SPAN&gt;&lt;EM style=": ; color: #808080; font-size: 10pt;"&gt; &lt;/EM&gt;&lt;SPAN style="color: #808080; font-size: 10pt;"&gt;in a text box and both display 2013 but am not sure if there's any other data like text that is making it not work.&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;STRONG&gt;Please help!!!!!&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;BR /&gt; &lt;BR /&gt; {&lt;BR /&gt; &amp;lt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Invoice Year]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;=, &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Invoice 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;$(= year(VStartInvDate) - 1)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;}&lt;BR /&gt; &amp;gt;&lt;BR /&gt; }&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Invoice Net Price]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 28 Dec 2014 23:31:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-statement-issue/m-p/794204#M280709</guid>
      <dc:creator>raghuvr33</dc:creator>
      <dc:date>2014-12-28T23:31:29Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis statement issue</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-statement-issue/m-p/794205#M280710</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #0000ff;"&gt;Sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;( { $ &amp;lt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #800000;"&gt;[Invoice Year]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;= {&lt;/SPAN&gt;&lt;STRONG style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;EM style="font-weight: inherit; font-size: 8pt; font-family: inherit; color: #808080;"&gt;$(= year(VStartInvDate) - 1)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;}&amp;gt; } &lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #800000;"&gt;[Invoice Net Price]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What is VstartInvDate a variable assigned every time you have some selection on Date? otherwise try&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #0000ff;"&gt;Sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;( { $ &amp;lt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #800000;"&gt;[Invoice Year]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;= {&lt;/SPAN&gt;&lt;STRONG style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;EM style="font-weight: inherit; font-size: 8pt; font-family: inherit; color: #808080;"&gt;$(= only(year(&lt;SPAN style="color: #800000; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 11px;"&gt;[Invoice Year]&lt;/SPAN&gt;) )- 1)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;}&amp;gt; } &lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #800000;"&gt;[Invoice Net Price]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 28 Dec 2014 23:55:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-statement-issue/m-p/794205#M280710</guid>
      <dc:creator />
      <dc:date>2014-12-28T23:55:54Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis statement issue</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-statement-issue/m-p/794206#M280711</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Thanks for the reply. Yes VstartinvDate is a variable that user chooses the start date based on which am trying to sum data for previous year.&lt;/P&gt;&lt;P&gt;The expression&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #808080; font-size: 8pt;"&gt;$(= year(VStartInvDate ) - 1)&amp;nbsp; &lt;SPAN style="font-size: 14pt;"&gt;gives the result 2013 correctly based on 2014 vStartdate when displayed in a text object.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #808080; font-size: 8pt;"&gt;&lt;SPAN style="font-size: 14pt;"&gt;Am totally at a loss understanding why it is not working in a set statement as no data gets returned. Is the format of the result from the above statement seperate from the format of year(invoice_date) ?? (which is how&amp;nbsp; [&lt;/SPAN&gt;&lt;SPAN style="font-size: 14pt;"&gt;Inovice Year] is calculated currently in script)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Dec 2014 13:26:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-statement-issue/m-p/794206#M280711</guid>
      <dc:creator>raghuvr33</dc:creator>
      <dc:date>2014-12-29T13:26:41Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis statement issue</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-statement-issue/m-p/794207#M280712</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Raghu,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Little confuse with what you are trying to do?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since in your set analysis you are nullifying the [Invoice Year] and in same set analysis you are assigning value to [Invoice Year] Field.&lt;/P&gt;&lt;P&gt;How could this work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try with only one condition. Either assign value to field or ignore it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try like&lt;/P&gt;&lt;P&gt;Sum({&amp;lt;[Invoice Year]={"&lt;STRONG&gt;&lt;EM style="color: #808080;"&gt;$(= year(VStartInvDate) - 1)&lt;/EM&gt;&lt;/STRONG&gt;"}&amp;gt;}[Invoice Net Price])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Dec 2014 13:32:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-statement-issue/m-p/794207#M280712</guid>
      <dc:creator>PrashantSangle</dc:creator>
      <dc:date>2014-12-29T13:32:53Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis statement issue</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-statement-issue/m-p/794208#M280713</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do you have Year and month as dimension? if true, then try to put just month and make two expressions one for current year and another for previous year.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Dec 2014 13:33:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-statement-issue/m-p/794208#M280713</guid>
      <dc:creator />
      <dc:date>2014-12-29T13:33:48Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis statement issue</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-statement-issue/m-p/794209#M280714</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Dear Max,&lt;/P&gt;&lt;P&gt;My understanding was to ignore the current selection for particular field we have to add statements like &lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Invoice Year]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;=, . By doing this it will take current selection for everything except invoice year which is being set to previous year based on the calculation&amp;nbsp; &lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Invoice 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;$(= year(VStartInvDate) - 1)}. &lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;STRONG&gt;That's the reason&lt;/STRONG&gt; for nullifying and chances are i may be wrong in what i understand as i am quite new to QV. I did try like you suggested and am getting the same blank results. Do you believe it is a data format issue with [Invoice Year] and the calculation &lt;STRONG&gt;&lt;EM style="color: #808080;"&gt;$(= year(VStartInvDate) - 1) ???&lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Dec 2014 13:47:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-statement-issue/m-p/794209#M280714</guid>
      <dc:creator>raghuvr33</dc:creator>
      <dc:date>2014-12-29T13:47:43Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis statement issue</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-statement-issue/m-p/794210#M280715</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just to check if there were any formatting issues added expression in a text object&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;((&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Invoice Year]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; - 1) = &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;$(= year (VStartInvDate )- 1)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;,'True','False') &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and it returned 'True'. So appears there are no data format issues but still not able to get it to work in&amp;nbsp; a set statement.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Dec 2014 14:12:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-statement-issue/m-p/794210#M280715</guid>
      <dc:creator>raghuvr33</dc:creator>
      <dc:date>2014-12-29T14:12:21Z</dc:date>
    </item>
  </channel>
</rss>

