<?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 Subselection in expression in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Subselection-in-expression/m-p/277251#M103370</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you build a table chart with dimensions NAME and CLASS, I think your expression could look like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;= only(GRADE) / avg(total&amp;lt;CLASS&amp;gt; GRADE)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You are not having multiple GRADE value per combination of NAME and CLASS, right?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In number tab, you could format the result as you like (e.g. check percentage).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 03 Dec 2011 20:09:25 GMT</pubDate>
    <dc:creator>swuehl</dc:creator>
    <dc:date>2011-12-03T20:09:25Z</dc:date>
    <item>
      <title>Subselection in expression</title>
      <link>https://community.qlik.com/t5/QlikView/Subselection-in-expression/m-p/277250#M103369</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm struggling with an expression for a chart. I want to calculate the GRADE (denpends of selected NAME) as percentage of the average of CLASS (A or B).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So: the GRADE of John (7) / Avg GRADE (of CLASS: a)&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Schermafbeelding 2011-12-03 om 12.44.18.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/9192_Schermafbeelding+2011-12-03+om+12.44.18.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Much thanks for respons. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Arthur&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 03 Dec 2011 11:53:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Subselection-in-expression/m-p/277250#M103369</guid>
      <dc:creator />
      <dc:date>2011-12-03T11:53:54Z</dc:date>
    </item>
    <item>
      <title>Subselection in expression</title>
      <link>https://community.qlik.com/t5/QlikView/Subselection-in-expression/m-p/277251#M103370</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you build a table chart with dimensions NAME and CLASS, I think your expression could look like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;= only(GRADE) / avg(total&amp;lt;CLASS&amp;gt; GRADE)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You are not having multiple GRADE value per combination of NAME and CLASS, right?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In number tab, you could format the result as you like (e.g. check percentage).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 03 Dec 2011 20:09:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Subselection-in-expression/m-p/277251#M103370</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2011-12-03T20:09:25Z</dc:date>
    </item>
    <item>
      <title>Re: Subselection in expression</title>
      <link>https://community.qlik.com/t5/QlikView/Subselection-in-expression/m-p/277252#M103371</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It partiallu works. But somehow the average of CLASS 'A' is changing when I select a NAME. How can you fix the CLASS average when you select a NAME?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hi Swuehl,&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="9187" alt="1.png" class="jive-image-thumbnail jive-image" src="https://community.qlik.com/legacyfs/online/9187_1.png" width="450" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="3.png" class="jive-image-thumbnail jive-image" onclick="" src="https://community.qlik.com/legacyfs/online/9201_3.png" width="450" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 04 Dec 2011 11:19:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Subselection-in-expression/m-p/277252#M103371</guid>
      <dc:creator />
      <dc:date>2011-12-04T11:19:33Z</dc:date>
    </item>
    <item>
      <title>Subselection in expression</title>
      <link>https://community.qlik.com/t5/QlikView/Subselection-in-expression/m-p/277253#M103372</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;To not regard the selection on NAME for this calculation, which will influence the average since the selected set is changing, try&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;= only(GRADE) / avg({1} total&amp;lt;CLASS&amp;gt; GRADE)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;to disregard all selections in any field&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;= only(GRADE) / avg({&amp;lt;NAME=&amp;gt;} total&amp;lt;CLASS&amp;gt; GRADE)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;to disregard only the selection in field NAME.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 04 Dec 2011 15:16:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Subselection-in-expression/m-p/277253#M103372</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2011-12-04T15:16:37Z</dc:date>
    </item>
    <item>
      <title>Re: Subselection in expression</title>
      <link>https://community.qlik.com/t5/QlikView/Subselection-in-expression/m-p/277254#M103373</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Fantistic this works - much thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One more question.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to select both, NAME and CLASS before this expression works.&lt;/P&gt;&lt;P&gt;Is it possible when I select NAME, that CLASS automatically is selected?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="1.png" class="jive-image-thumbnail jive-image" onclick="" src="https://community.qlik.com/legacyfs/online/9202_1.png" width="450" /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 04 Dec 2011 19:36:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Subselection-in-expression/m-p/277254#M103373</guid>
      <dc:creator />
      <dc:date>2011-12-04T19:36:21Z</dc:date>
    </item>
    <item>
      <title>Subselection in expression</title>
      <link>https://community.qlik.com/t5/QlikView/Subselection-in-expression/m-p/277255#M103374</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think you don't need to select CLASS. In your screenshot, I believe the middle and the right image are showing the same value in the bar, "only" the total value displayed is different. Enable values on data point or hover with the mouse over the bar to show the value of it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The value 1,35 in your example is the value for expression total, and this will only give the correct result if you select CLASS. I would assume you just don't need to show this value (set to different or deactivate on general tab).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you do need to show the value at this place, I think you can just use this as expression&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;= aggr(only(GRADE) / avg({&amp;lt;NAME=&amp;gt;} total&amp;lt;CLASS&amp;gt; GRADE),NAME,CLASS)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so it will evaluate correct even as expression total (at least with a NAME selected, if you have nothing selected, you don't get a value, you would need to state the aggregation expression that should be used in this case to aggregate the values of the aggr() table, maybe put sum() or avg() around aggr()?)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Dec 2011 21:04:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Subselection-in-expression/m-p/277255#M103374</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2011-12-05T21:04:46Z</dc:date>
    </item>
  </channel>
</rss>

