<?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: getting unexpected result using Set analysis in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/getting-unexpected-result-using-Set-analysis/m-p/591102#M684890</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please read:&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/blogs/qlikviewdesignblog/2013/09/09/aggregation-scope" title="http://community.qlik.com/blogs/qlikviewdesignblog/2013/09/09/aggregation-scope"&gt;http://community.qlik.com/blogs/qlikviewdesignblog/2013/09/09/aggregation-scope&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I think your second expression should look like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;=sum(total&amp;lt;Item&amp;gt; Price)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Besides this, I think you don't need to format your key with a special date format, when you then want to apply month() function, a &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;"&gt;&amp;nbsp; month(key) as Month,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;should be enough (assuming the key field is correctly read in as date, i.e. your standard date format is set appropriatly).&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 15 Feb 2014 17:51:51 GMT</pubDate>
    <dc:creator>swuehl</dc:creator>
    <dc:date>2014-02-15T17:51:51Z</dc:date>
    <item>
      <title>getting unexpected result using Set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/getting-unexpected-result-using-Set-analysis/m-p/591101#M684889</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;I am having a source table like this&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 196px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD height="20" width="64"&gt;Item&lt;/TD&gt;&lt;TD width="68"&gt;key&lt;/TD&gt;&lt;TD width="64"&gt;price&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;A&lt;/TD&gt;&lt;TD align="right" class="xl63"&gt;2/15/2013&lt;/TD&gt;&lt;TD align="right"&gt;34&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;A&lt;/TD&gt;&lt;TD align="right" class="xl63"&gt;1/16/2013&lt;/TD&gt;&lt;TD align="right"&gt;35&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Loaded using the following script &lt;/P&gt;&lt;P&gt;LOAD Item, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; key,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; month(date(key,'YYYYMMDD')) as Month,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; price as Price&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I tried to make a straight table with Item and Month as dimensions, Sum(Price) and Sum({&amp;lt;Month=&amp;gt;}Price) as expressions I am getting the same value over both the expressions as below.&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 398px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl63" height="17" width="60"&gt;Item&lt;/TD&gt;&lt;TD class="xl63" style="border-left: none;" width="98"&gt;Month&lt;/TD&gt;&lt;TD class="xl63" style="border-left: none;" width="98"&gt;sum(Price)&lt;/TD&gt;&lt;TD class="xl63" style="border-left: none;" width="142"&gt;sum({&amp;lt;Month=&amp;gt;}Price)&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="17" style="border-top: none;"&gt; &lt;/TD&gt;&lt;TD class="xl65" style="border-top: none;"&gt; &lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none;"&gt;&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="17" style="border-top: none;"&gt;A&lt;/TD&gt;&lt;TD class="xl68" style="border-top: none; border-left: none;"&gt;Jan&lt;/TD&gt;&lt;TD align="right" class="xl69" style="border-top: none; border-left: none;"&gt;35&lt;/TD&gt;&lt;TD align="right" class="xl69" style="border-top: none; border-left: none;"&gt;35&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="17" style="border-top: none;"&gt;A&lt;/TD&gt;&lt;TD class="xl68" style="border-top: none; border-left: none;"&gt;Feb&lt;/TD&gt;&lt;TD align="right" class="xl69" style="border-top: none; border-left: none;"&gt;34&lt;/TD&gt;&lt;TD align="right" class="xl69" style="border-top: none; border-left: none;"&gt;34&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was expecting 69 in the fourth column for both rows.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can someone explain it please. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 15 Feb 2014 17:40:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/getting-unexpected-result-using-Set-analysis/m-p/591101#M684889</guid>
      <dc:creator />
      <dc:date>2014-02-15T17:40:05Z</dc:date>
    </item>
    <item>
      <title>Re: getting unexpected result using Set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/getting-unexpected-result-using-Set-analysis/m-p/591102#M684890</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please read:&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/blogs/qlikviewdesignblog/2013/09/09/aggregation-scope" title="http://community.qlik.com/blogs/qlikviewdesignblog/2013/09/09/aggregation-scope"&gt;http://community.qlik.com/blogs/qlikviewdesignblog/2013/09/09/aggregation-scope&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I think your second expression should look like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;=sum(total&amp;lt;Item&amp;gt; Price)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Besides this, I think you don't need to format your key with a special date format, when you then want to apply month() function, a &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;"&gt;&amp;nbsp; month(key) as Month,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;should be enough (assuming the key field is correctly read in as date, i.e. your standard date format is set appropriatly).&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 15 Feb 2014 17:51:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/getting-unexpected-result-using-Set-analysis/m-p/591102#M684890</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2014-02-15T17:51:51Z</dc:date>
    </item>
    <item>
      <title>Re: getting unexpected result using Set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/getting-unexpected-result-using-Set-analysis/m-p/591103#M684891</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;/P&gt;&lt;P&gt;In general, if you made selection/filter on Month field then, the corresponding selection data will be appeared on screen. But, some times, we don't need to be applied filters on graphs/charts even though if you apply filters. So, In this scenario, we use mention those fields with '=' sign in SET analysis.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In your below example,&amp;nbsp; &lt;/P&gt;&lt;P&gt;Sum({&amp;lt;Month=&amp;gt;} Price) means, irrespective of selection on Month field, the SUM will be calculated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To get clear understanding, try to use a list box for your Month field, and make a selection on "Jan" and see whether your existed chart has reflected with your current selection or not. &lt;/P&gt;&lt;P&gt;Again, try to disable your 4th expression your chart and do the same selection. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope, you are clear now.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 15 Feb 2014 17:52:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/getting-unexpected-result-using-Set-analysis/m-p/591103#M684891</guid>
      <dc:creator />
      <dc:date>2014-02-15T17:52:33Z</dc:date>
    </item>
    <item>
      <title>Re: getting unexpected result using Set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/getting-unexpected-result-using-Set-analysis/m-p/591104#M684892</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sets are used to change the s&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;election of data, but they honor your dimensions.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Try this instead:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;sum&lt;/STRONG&gt;( Total [Price] ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ben&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 15 Feb 2014 17:57:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/getting-unexpected-result-using-Set-analysis/m-p/591104#M684892</guid>
      <dc:creator />
      <dc:date>2014-02-15T17:57:45Z</dc:date>
    </item>
    <item>
      <title>Re: getting unexpected result using Set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/getting-unexpected-result-using-Set-analysis/m-p/591105#M684893</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Change expression for 4th column as &lt;/P&gt;&lt;P&gt;SUM(TOTAL {&amp;lt;Month = &amp;gt;]price) or&lt;/P&gt;&lt;P&gt;SUM(TOTAL price)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 15 Feb 2014 17:57:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/getting-unexpected-result-using-Set-analysis/m-p/591105#M684893</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2014-02-15T17:57:52Z</dc:date>
    </item>
  </channel>
</rss>

