<?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 woes in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-Analysis-woes/m-p/797638#M1050234</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;It seems that there are many questions regarding set analysis which just points to the complexity of the subject and I am no exception.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have created a variable vTrial&amp;nbsp; as Makedate(Year(Today())-1,month(today()), Day(Today())) to get today's date as of&amp;nbsp; last year.&lt;/P&gt;&lt;P&gt;When I use the variable in a text boox as $(vTrial)&amp;nbsp; last year's date is returned.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When using this variable to get sum of values, the sum of the whole data set is returned. the formula/expression is like so:&lt;/P&gt;&lt;P&gt;=sum({&amp;lt;TranDate={"=$(vTrial)"}&amp;gt;}Expression4)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I use the same variable with an IF(...) Statement the correct results are returned&lt;/P&gt;&lt;P&gt;=sum(if(TranDate=$(vTrial),Expression4))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Further, when using the expanded formula that is used to create the variable instead of the variable, whole data set is returned as the sum.&lt;/P&gt;&lt;P&gt;=sum({&amp;lt;TranDate={"=$(=MakeDate(Year(today())-1,Month(Today()),Day(Today())))"}&amp;gt;}Expression4)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To say the least it is quite frustrating.&lt;/P&gt;&lt;P&gt;Is there a concise source that explains the ins and outs of the nomenclature and correct punctuation to get the expressions to yield correct results? I am using set analysis but resort to use only with "light weight" expressions such as Year={2014} etc. (Not a good way to do set analysis!!!)&lt;/P&gt;&lt;P&gt;I came across some blogs and articles but none were able to shed light in a concise way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The sample application is attached&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Josh&lt;/P&gt;&lt;P&gt;PS you may see from back track that I am not new to QV but still am feeling the pain...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 10 Nov 2014 08:25:42 GMT</pubDate>
    <dc:creator>jduenyas</dc:creator>
    <dc:date>2014-11-10T08:25:42Z</dc:date>
    <item>
      <title>Set Analysis woes</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-woes/m-p/797638#M1050234</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;It seems that there are many questions regarding set analysis which just points to the complexity of the subject and I am no exception.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have created a variable vTrial&amp;nbsp; as Makedate(Year(Today())-1,month(today()), Day(Today())) to get today's date as of&amp;nbsp; last year.&lt;/P&gt;&lt;P&gt;When I use the variable in a text boox as $(vTrial)&amp;nbsp; last year's date is returned.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When using this variable to get sum of values, the sum of the whole data set is returned. the formula/expression is like so:&lt;/P&gt;&lt;P&gt;=sum({&amp;lt;TranDate={"=$(vTrial)"}&amp;gt;}Expression4)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I use the same variable with an IF(...) Statement the correct results are returned&lt;/P&gt;&lt;P&gt;=sum(if(TranDate=$(vTrial),Expression4))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Further, when using the expanded formula that is used to create the variable instead of the variable, whole data set is returned as the sum.&lt;/P&gt;&lt;P&gt;=sum({&amp;lt;TranDate={"=$(=MakeDate(Year(today())-1,Month(Today()),Day(Today())))"}&amp;gt;}Expression4)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To say the least it is quite frustrating.&lt;/P&gt;&lt;P&gt;Is there a concise source that explains the ins and outs of the nomenclature and correct punctuation to get the expressions to yield correct results? I am using set analysis but resort to use only with "light weight" expressions such as Year={2014} etc. (Not a good way to do set analysis!!!)&lt;/P&gt;&lt;P&gt;I came across some blogs and articles but none were able to shed light in a concise way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The sample application is attached&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Josh&lt;/P&gt;&lt;P&gt;PS you may see from back track that I am not new to QV but still am feeling the pain...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Nov 2014 08:25:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-woes/m-p/797638#M1050234</guid>
      <dc:creator>jduenyas</dc:creator>
      <dc:date>2014-11-10T08:25:42Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis woes</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-woes/m-p/797639#M1050235</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Makedate(Year(Today())-1,month(today()), Day(Today())) &lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Put an = sign in front of the expression in the variable. You can also use &lt;EM&gt;=addyears(today(),-1)&lt;/EM&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 10pt; line-height: 1.5em;"&gt;=sum({&amp;lt;TranDate={"=$(=MakeDate(Year(today())-1,Month(Today()),Day(Today())))"}&amp;gt;}Expression4)&lt;/SPAN&gt;&lt;/P&gt;
&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;If you remove the = sign in front the the dollar expanded expression it will work.&lt;/P&gt;&lt;P&gt;sum({&amp;lt;TranDate={"11/10/2013"}&amp;gt;} Expression4) works, but sum({&amp;lt;TranDate={"=11/10/2013"}&amp;gt;} Expression4) does not.&lt;/P&gt;&lt;P&gt;Thus: &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;=sum({&amp;lt;TranDate={"$(=MakeDate(Year(today())-1,Month(Today()),Day(Today())))"}&amp;gt;}Expression4)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Nov 2014 10:28:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-woes/m-p/797639#M1050235</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2014-11-10T10:28:05Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis woes</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-woes/m-p/797640#M1050236</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Gysbert. I was hoping to receive a reply from you and you came through. You certainly know the ways in QV.&lt;/P&gt;&lt;P&gt;However, this put an emphasis on my request for a source that will explain the correct punctuation of set analysis.&lt;/P&gt;&lt;P&gt;Is there such a written source somewhere?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Again thank you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Josh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Nov 2014 15:09:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-woes/m-p/797640#M1050236</guid>
      <dc:creator>jduenyas</dc:creator>
      <dc:date>2014-11-10T15:09:15Z</dc:date>
    </item>
  </channel>
</rss>

