<?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 Selected field when using Aggr and Set Analysis in a calculated dimension in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Selected-field-when-using-Aggr-and-Set-Analysis-in-a-calculated/m-p/773730#M274493</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;Presumably I am doing something wrong but I do not understand QV's behaviour in the attached document.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the data I am working with in the example:&lt;/P&gt;&lt;P&gt;Quarter, 2QRolling, Sales, QuarterIndex&lt;/P&gt;&lt;P&gt;&amp;nbsp; 2014 Q4, 14Q3-14Q4, 100, 12&lt;/P&gt;&lt;P&gt;&amp;nbsp; 2014 Q3, 14Q3-14Q4, 100, 11&lt;/P&gt;&lt;P&gt;&amp;nbsp; 2014 Q2, 14Q1-14Q2, 100, 10&lt;/P&gt;&lt;P&gt;&amp;nbsp; 2014 Q1, 14Q1-14Q2, 100, 9&lt;/P&gt;&lt;P&gt;&amp;nbsp; 2013 Q4, 13Q3-13Q4, 150, 8&lt;/P&gt;&lt;P&gt;&amp;nbsp; 2013 Q3, 13Q3-13Q4, 200, 7&lt;/P&gt;&lt;P&gt;&amp;nbsp; 2013 Q2, 13Q1-13Q2, 210, 6&lt;/P&gt;&lt;P&gt;&amp;nbsp; 2013 Q1, 13Q1-13Q2, 300, 5&lt;/P&gt;&lt;P&gt;&amp;nbsp; 2012 Q4, 12Q3-12Q4, 150, 4&lt;/P&gt;&lt;P&gt;&amp;nbsp; 2012 Q3, 12Q3-12Q4, 150, 3&lt;/P&gt;&lt;P&gt;&amp;nbsp; 2012 Q2, 12Q1-12Q2, 150, 2&lt;/P&gt;&lt;P&gt;&amp;nbsp; 2012 Q1, 12Q1-12Q2, 150, 1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is what I am trying to achieve: &lt;BR /&gt;a) data are aggregated by the field [2QRolling] (see chart: Bar - 2QRolling) &lt;BR /&gt;b) when I make a selection in the chart by selecting a bar, the selection occurs on the field [Quarter] (and not in [2QRolling]) &lt;/P&gt;&lt;P&gt;c) all the values for [2QRolling] have to be displayed in the chart&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;To meet the requirements above I use the following calculated dimension:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;= Aggr(Only({&amp;lt;[Quarter]=P({1}[Quarter])&amp;gt;} [2QRolling]), [Quarter])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Aggregation around [Quarter] should guarantee that the selection happens on [Quarter] (correct?).&lt;/P&gt;&lt;P&gt;Only({&amp;lt;[Quarter]=P({1}[Quarter])&amp;gt;} should instead guarantee that I consider all the quarters - hence all the [2QRolling] - no matter what quarter is selected. Right?&lt;/P&gt;&lt;P&gt;Given how the dimension is defined I then simply use the following expression: = Sum({1}[Sales])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem I am having, and I cannot explain, is that when I select a bar the first time I get the right selections on the quarter (e.g. 13Q3-13Q4 returns Quarter: 2013 Q4, 2013 Q3). When I select a second time any other bar the selections get cleared out and no quarters are selected. If I re-select the same bar a second time the corresponding quarters get correctly selected.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;You can try to play with the attached document and see the behaviour described.&lt;BR /&gt;&lt;BR /&gt;Any feedback would be appreciated.&lt;BR /&gt;Thanks&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 05 Nov 2014 14:46:32 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2014-11-05T14:46:32Z</dc:date>
    <item>
      <title>Selected field when using Aggr and Set Analysis in a calculated dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Selected-field-when-using-Aggr-and-Set-Analysis-in-a-calculated/m-p/773730#M274493</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;Presumably I am doing something wrong but I do not understand QV's behaviour in the attached document.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the data I am working with in the example:&lt;/P&gt;&lt;P&gt;Quarter, 2QRolling, Sales, QuarterIndex&lt;/P&gt;&lt;P&gt;&amp;nbsp; 2014 Q4, 14Q3-14Q4, 100, 12&lt;/P&gt;&lt;P&gt;&amp;nbsp; 2014 Q3, 14Q3-14Q4, 100, 11&lt;/P&gt;&lt;P&gt;&amp;nbsp; 2014 Q2, 14Q1-14Q2, 100, 10&lt;/P&gt;&lt;P&gt;&amp;nbsp; 2014 Q1, 14Q1-14Q2, 100, 9&lt;/P&gt;&lt;P&gt;&amp;nbsp; 2013 Q4, 13Q3-13Q4, 150, 8&lt;/P&gt;&lt;P&gt;&amp;nbsp; 2013 Q3, 13Q3-13Q4, 200, 7&lt;/P&gt;&lt;P&gt;&amp;nbsp; 2013 Q2, 13Q1-13Q2, 210, 6&lt;/P&gt;&lt;P&gt;&amp;nbsp; 2013 Q1, 13Q1-13Q2, 300, 5&lt;/P&gt;&lt;P&gt;&amp;nbsp; 2012 Q4, 12Q3-12Q4, 150, 4&lt;/P&gt;&lt;P&gt;&amp;nbsp; 2012 Q3, 12Q3-12Q4, 150, 3&lt;/P&gt;&lt;P&gt;&amp;nbsp; 2012 Q2, 12Q1-12Q2, 150, 2&lt;/P&gt;&lt;P&gt;&amp;nbsp; 2012 Q1, 12Q1-12Q2, 150, 1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is what I am trying to achieve: &lt;BR /&gt;a) data are aggregated by the field [2QRolling] (see chart: Bar - 2QRolling) &lt;BR /&gt;b) when I make a selection in the chart by selecting a bar, the selection occurs on the field [Quarter] (and not in [2QRolling]) &lt;/P&gt;&lt;P&gt;c) all the values for [2QRolling] have to be displayed in the chart&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;To meet the requirements above I use the following calculated dimension:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;= Aggr(Only({&amp;lt;[Quarter]=P({1}[Quarter])&amp;gt;} [2QRolling]), [Quarter])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Aggregation around [Quarter] should guarantee that the selection happens on [Quarter] (correct?).&lt;/P&gt;&lt;P&gt;Only({&amp;lt;[Quarter]=P({1}[Quarter])&amp;gt;} should instead guarantee that I consider all the quarters - hence all the [2QRolling] - no matter what quarter is selected. Right?&lt;/P&gt;&lt;P&gt;Given how the dimension is defined I then simply use the following expression: = Sum({1}[Sales])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem I am having, and I cannot explain, is that when I select a bar the first time I get the right selections on the quarter (e.g. 13Q3-13Q4 returns Quarter: 2013 Q4, 2013 Q3). When I select a second time any other bar the selections get cleared out and no quarters are selected. If I re-select the same bar a second time the corresponding quarters get correctly selected.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;You can try to play with the attached document and see the behaviour described.&lt;BR /&gt;&lt;BR /&gt;Any feedback would be appreciated.&lt;BR /&gt;Thanks&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Nov 2014 14:46:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Selected-field-when-using-Aggr-and-Set-Analysis-in-a-calculated/m-p/773730#M274493</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-11-05T14:46:32Z</dc:date>
    </item>
  </channel>
</rss>

