<?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: Problem with set analysis in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Problem-with-set-analysis/m-p/1041381#M931966</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When you don't put set analysis in your outer Sum() function is adheres to the selections you have made. When 2015 is selected it would want to show 2015's result, but the imaginary table created by Aggr() function is only showing 2014. So unless we specify the outer sum to look for 2014 (&lt;STRONG style=": ; color: #ff0000; font-size: 13px; font-style: inherit; font-family: inherit; font-weight: inherit;"&gt;{&amp;lt;year={$(=DATA_FIM)}&amp;gt;}&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;) it will continue to look for current selected year and show null&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 10 Mar 2016 19:42:34 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2016-03-10T19:42:34Z</dc:date>
    <item>
      <title>Problem with set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-set-analysis/m-p/1041378#M931963</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have this expression: sum(aggr(if(sum({&amp;lt;year={$(=(DATA_INI))}&amp;gt;} valor )&amp;lt;&amp;gt;0 and (sum( {&amp;lt;year={$(=(DATA_FIM))}&amp;gt;}&amp;nbsp; valor )&amp;lt;&amp;gt;0),sum({&amp;lt;year={$(=(DATA_FIM))}&amp;gt;} value),0),filial,categoria_produto,subcategoria_produto,grupo_produto,subgrupo_produto,DESC_PRODUTO))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What is the problem? So, when I did this expression with the current year, works perfectly.. but, the expression (DATA_FIM) is the last year, for example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Current Year = 2016&lt;/P&gt;&lt;P&gt;Last year = 2015&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I get the year with that expression( =GetFieldSelections(year)) and the last year(=GetFieldSelections(year) -1).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I put the current year(2016), the results is correct. When I put last year(2015), the results is wrong.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That expression is in a pivot table like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid rgb(0, 0, 0); width: 100%;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Filial&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;Categoria&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Dimension...n&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Current Year&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Last Year&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;xxxx&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;ggggg&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;aaaaaaaa&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;100&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;90&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Someone have a Idea?&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/Problem-with-set-analysis/m-p/1041378#M931963</guid>
      <dc:creator />
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-set-analysis/m-p/1041379#M931964</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be try this:&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; font-size: 13px;"&gt;&lt;STRONG&gt;Sum(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;SPAN style="color: #ff0000;"&gt;{&amp;lt;year={$(=DATA_FIM)}&amp;gt;}&lt;/SPAN&gt; A&lt;/SPAN&gt;ggr(If(Sum({&amp;lt;year={$(=DATA_INI)}&amp;gt;} valor) &amp;lt;&amp;gt; 0 and Sum({&amp;lt;year={$(=DATA_FIM)}&amp;gt;}&amp;nbsp; valor) &amp;lt;&amp;gt; 0), Sum({&amp;lt;year={$(=DATA_FIM)}&amp;gt;}value), 0), filial, categoria_produto, subcategoria_produto, grupo_produto, subgrupo_produto, DESC_PRODUTO))&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Mar 2016 00:43:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-set-analysis/m-p/1041379#M931964</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-03-10T00:43:42Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-set-analysis/m-p/1041380#M931965</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sunny T, thank you so much! That's work perfectly.But I don't understand the logic behind this. Can you explain to me?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Mar 2016 18:30:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-set-analysis/m-p/1041380#M931965</guid>
      <dc:creator />
      <dc:date>2016-03-10T18:30:34Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-set-analysis/m-p/1041381#M931966</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When you don't put set analysis in your outer Sum() function is adheres to the selections you have made. When 2015 is selected it would want to show 2015's result, but the imaginary table created by Aggr() function is only showing 2014. So unless we specify the outer sum to look for 2014 (&lt;STRONG style=": ; color: #ff0000; font-size: 13px; font-style: inherit; font-family: inherit; font-weight: inherit;"&gt;{&amp;lt;year={$(=DATA_FIM)}&amp;gt;}&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;) it will continue to look for current selected year and show null&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Mar 2016 19:42:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-set-analysis/m-p/1041381#M931966</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-03-10T19:42:34Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-set-analysis/m-p/1041382#M931967</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Sunny T for your explanation! Now I understand! Have a nice day!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Mar 2016 12:38:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-set-analysis/m-p/1041382#M931967</guid>
      <dc:creator />
      <dc:date>2016-03-11T12:38:21Z</dc:date>
    </item>
  </channel>
</rss>

