<?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 anomaly when plotted in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-Analysis-anomaly-when-plotted/m-p/511309#M191032</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'll try that Michael thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 19 Dec 2013 21:44:34 GMT</pubDate>
    <dc:creator>alexis</dc:creator>
    <dc:date>2013-12-19T21:44:34Z</dc:date>
    <item>
      <title>Set Analysis anomaly when plotted</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-anomaly-when-plotted/m-p/511302#M191025</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-family: 'trebuchet ms', geneva;"&gt;Below is a screen shot of the anomaly I will try to describe.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'trebuchet ms', geneva;"&gt;I am performing some calculations which I will simply call "&lt;STRONG&gt;Numerator&lt;/STRONG&gt;", "&lt;STRONG&gt;Denominator&lt;/STRONG&gt;" and a ratio of the two&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'trebuchet ms', geneva;"&gt;When I select a month/year, the 3 text boxes (see arrows) show the correct figure for the numerator (51554), denominator(62340) and the ratio (82.7%). In a table of the same figures however, the values for denominator and ratio (by definition) are incorrect (see red figures). Oddly enough though the Expression total (see BLUE rings) is correct.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="test2.jpg" class="jive-image" src="https://community.qlik.com/legacyfs/online/50705_test2.jpg" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I now deselect the month, the table looks as follows - all the numerator figures are still correct and all the denominator ones are not - the November Denominator that we saw earlier is even different to before, so I am totally buffled.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="test3.jpg" class="jive-image" src="https://community.qlik.com/legacyfs/online/50703_test3.jpg" style="width: 620px; height: 321px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'trebuchet ms', geneva;"&gt;Here are the expressions:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'trebuchet ms', geneva;"&gt;Numerator: = &lt;STRONG&gt;count ({$&amp;lt;[POSStatusID] = {'21','22'}&amp;gt;} DISTINCT TID)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'trebuchet ms', geneva;"&gt;Denominator: &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-family: 'trebuchet ms', geneva;"&gt;&lt;STRONG&gt;= sum({$&amp;lt;[$(=Concat({1&amp;lt;$Field-={'VendorName','ModelName'}&amp;gt;}distinct $Field,']=,[')&amp;amp;']='),&lt;/STRONG&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #339966; font-family: 'trebuchet ms', geneva;"&gt; [ProductionEnd] = {'&amp;gt;=$(=Min(DateNo))'}, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'trebuchet ms', geneva;"&gt;&lt;SPAN style="color: #339966;"&gt;[ProductionStart] = {'&amp;lt;=$(=Max(DateNo))'} &amp;gt;}&lt;/SPAN&gt; TransRecNo)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'trebuchet ms', geneva;"&gt;The &lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Blue&lt;/STRONG&gt;&lt;/SPAN&gt; part of the denominator builds a list of fields that are to be ignored for all fields except those listed (e.g. sum({$&amp;lt;[field1]=, [field2]=, .... &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'trebuchet ms', geneva;"&gt;The &lt;STRONG style="color: #339966;"&gt;Green&lt;/STRONG&gt; part basically compares 2 fields in my Transactions table "ProductionStart" and "ProductionEnd" with the date range for each month&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'trebuchet ms', geneva;"&gt;It would be hugely appreciated if someone has any suggestions regarding this odd behaviour!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'trebuchet ms', geneva;"&gt;Alexis&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Dec 2013 17:57:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-anomaly-when-plotted/m-p/511302#M191025</guid>
      <dc:creator>alexis</dc:creator>
      <dc:date>2013-12-19T17:57:46Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis anomaly when plotted</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-anomaly-when-plotted/m-p/511303#M191026</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Quite a logic...&amp;nbsp; &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/confused.png" /&gt;&lt;/P&gt;&lt;P&gt;I'm not trying to get into it, but the syntax is not clean, I think.&amp;nbsp; Try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;= sum({$&amp;lt;$(='[' &amp;amp; Concat({1&amp;lt;$Field-={'VendorName','ModelName'}&amp;gt;}distinct $Field,']=,[') &amp;amp;']='), &lt;BR /&gt;&amp;nbsp; [ProductionEnd] = {'&amp;gt;=$(=Min(DateNo))'}, &lt;BR /&gt; [ProductionStart] = {'&amp;lt;=$(=Max(DateNo))'} &amp;gt;} TransRecNo)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Dec 2013 18:25:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-anomaly-when-plotted/m-p/511303#M191026</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-12-19T18:25:53Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis anomaly when plotted</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-anomaly-when-plotted/m-p/511304#M191027</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;On the second thought - why don't you use this:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-family: 'trebuchet ms', geneva;"&gt;&lt;STRONG&gt;= sum({1&amp;lt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #339966; font-family: 'trebuchet ms', geneva;"&gt;[ProductionEnd]={'&amp;gt;=$(=Min(DateNo))'}, &lt;/SPAN&gt;&lt;SPAN style="font-family: 'trebuchet ms', geneva;"&gt;&lt;SPAN style="color: #339966;"&gt;[ProductionStart]={'&amp;lt;=$(=Max(DateNo))'} &amp;gt;}&lt;/SPAN&gt; TransRecNo)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Dec 2013 18:36:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-anomaly-when-plotted/m-p/511304#M191027</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-12-19T18:36:48Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis anomaly when plotted</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-anomaly-when-plotted/m-p/511305#M191028</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;Thanks for responding.&lt;/P&gt;&lt;P&gt;The code that you "removed" is responsible for ignoring all field selections except the 2 listed (VendorName and ModelName). This code was picked up from a wonderfully helpful thread &lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/docs/DOC-1334"&gt;http://community.qlik.com/docs/DOC-1334&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In any case, the code works as was shown in the text boxes in my description. It is the behaviour in a plot (graph, table etc) which is puzzling!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Alexis&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Dec 2013 18:57:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-anomaly-when-plotted/m-p/511305#M191028</guid>
      <dc:creator>alexis</dc:creator>
      <dc:date>2013-12-19T18:57:37Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis anomaly when plotted</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-anomaly-when-plotted/m-p/511306#M191029</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Alexis,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I didn't "remove" it - notice that I replaced "$" with "1".&amp;nbsp; That is, instead of rule&lt;/P&gt;&lt;P&gt;"ignore fields &lt;STRONG&gt;&amp;lt;listing all fields here&amp;gt;&lt;/STRONG&gt; but use ProductionEnd and ProductionStart"&lt;/P&gt;&lt;P&gt;I use the rule&lt;/P&gt;&lt;P&gt;"ignore &lt;STRONG&gt;all&lt;/STRONG&gt; fields but use ProductionEnd and ProductionStart"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As for the specific problem - it would be helpful if you upload the app.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Michael&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Dec 2013 19:14:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-anomaly-when-plotted/m-p/511306#M191029</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-12-19T19:14:39Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis anomaly when plotted</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-anomaly-when-plotted/m-p/511307#M191030</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;A set analysis expression calculates one set for the entire chart, not a set per row. That's probably why the totals are correct, because those use the complete data set. It would also be the reason that this part will probably not select the ProductionEnd and ProductionStart dates you expect: &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: 'trebuchet ms', geneva; color: #339966;"&gt;[ProductionEnd] = {'&amp;gt;=$(=Min(DateNo))'},&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="color: #339966; font-style: inherit; font-family: inherit; font-weight: inherit;"&gt;[ProductionStart] = {'&amp;lt;=$(=Max(DateNo))'}&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="color: #339966; font-style: inherit; font-family: inherit; font-weight: inherit;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Dec 2013 19:14:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-anomaly-when-plotted/m-p/511307#M191030</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2013-12-19T19:14:48Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis anomaly when plotted</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-anomaly-when-plotted/m-p/511308#M191031</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is the most probable reason.&amp;nbsp; It worth trying "if" instead of "set", given that the month-year is a dimension.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Dec 2013 19:19:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-anomaly-when-plotted/m-p/511308#M191031</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-12-19T19:19:03Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis anomaly when plotted</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-anomaly-when-plotted/m-p/511309#M191032</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'll try that Michael thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Dec 2013 21:44:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-anomaly-when-plotted/m-p/511309#M191032</guid>
      <dc:creator>alexis</dc:creator>
      <dc:date>2013-12-19T21:44:34Z</dc:date>
    </item>
  </channel>
</rss>

