<?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 without result although unique result possible via UI in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-analysis-without-result-although-unique-result-possible-via/m-p/1143239#M896835</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think the reason is the position where the conditions are applied - this meant within the inner or the outer aggregation:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=avg(&lt;/P&gt;&lt;P&gt;{$&amp;lt;&lt;/P&gt;&lt;P&gt;Fruit={"=rank(aggr(max({$&amp;lt; Type -={Yellow}&amp;gt;} Out_Stamp-In_Stamp),Fruit),1)&amp;lt;=$(vNumberLongestInShelf)"},&lt;/P&gt;&lt;P&gt;StorageNo={"=max(Out_Stamp-In_Stamp)"}&lt;/P&gt;&lt;P&gt;&amp;gt;}&lt;/P&gt;&lt;P&gt;Out_Stamp-In_Stamp)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See also: &lt;A href="https://community.qlik.com/qlik-blogpost/4669"&gt;Set Analysis in the Aggr function&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 26 Jul 2016 05:31:29 GMT</pubDate>
    <dc:creator>marcus_sommer</dc:creator>
    <dc:date>2016-07-26T05:31:29Z</dc:date>
    <item>
      <title>Set analysis without result although unique result possible via UI</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-without-result-although-unique-result-possible-via/m-p/1143236#M896832</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;This seems to be a general issue when set analysis gives a different result (or no result) compared to when a selection is done via a list box. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;An example:&lt;/P&gt;&lt;P&gt;There are 3 conditions in a set point:&lt;/P&gt;&lt;P&gt;=avg(&lt;/P&gt;&lt;P&gt;{$&amp;lt;&lt;/P&gt;&lt;P&gt;Type -={Yellow},&lt;/P&gt;&lt;P&gt;Fruit={"=rank(aggr(max(Out_Stamp-In_Stamp),Fruit),1)&amp;lt;=$(vNumberLongestInShelf)"},&lt;/P&gt;&lt;P&gt;StorageNo={"=max(Out_Stamp-In_Stamp)"}&lt;/P&gt;&lt;P&gt;&amp;gt;}&lt;/P&gt;&lt;P&gt;Out_Stamp-In_Stamp)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It turns out that the fruits being longest in shelf are all 'yellow'.&lt;/P&gt;&lt;P&gt;Now if I chose a smaller number than this the set analysis gives &lt;STRONG&gt;no&lt;/STRONG&gt; result when I have no UI selection.&lt;/P&gt;&lt;P&gt;When I restrict via List box to Type = {Green}, I get a result.&lt;/P&gt;&lt;P&gt;When I do not use the set restriction of Type -={Yellow} then I get a result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So the UI restrictions via List box limits the selection of all three parameters and the set analysis does not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How do I get the average of Shelf-time of the fruits that are not yellow and with the longest duration in shelf per storage#?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for any help. Seems to me a very essential element to understand when dealing with Set analysis.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Andreas&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/Set-analysis-without-result-although-unique-result-possible-via/m-p/1143236#M896832</guid>
      <dc:creator>andreas_koehler</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis without result although unique result possible via UI</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-without-result-although-unique-result-possible-via/m-p/1143237#M896833</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is not a straight forward question that you ask and would require some playing around with the data using different expressions. Would you be able to provide a sample with expected output?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jul 2016 01:04:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-without-result-although-unique-result-possible-via/m-p/1143237#M896833</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-07-26T01:04:15Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis without result although unique result possible via UI</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-without-result-although-unique-result-possible-via/m-p/1143238#M896834</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sunny,&lt;/P&gt;&lt;P&gt;need to make one. I did not provide one in the first instance as I thought that this is a generic problem.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jul 2016 01:29:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-without-result-although-unique-result-possible-via/m-p/1143238#M896834</guid>
      <dc:creator>andreas_koehler</dc:creator>
      <dc:date>2016-07-26T01:29:33Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis without result although unique result possible via UI</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-without-result-although-unique-result-possible-via/m-p/1143239#M896835</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think the reason is the position where the conditions are applied - this meant within the inner or the outer aggregation:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=avg(&lt;/P&gt;&lt;P&gt;{$&amp;lt;&lt;/P&gt;&lt;P&gt;Fruit={"=rank(aggr(max({$&amp;lt; Type -={Yellow}&amp;gt;} Out_Stamp-In_Stamp),Fruit),1)&amp;lt;=$(vNumberLongestInShelf)"},&lt;/P&gt;&lt;P&gt;StorageNo={"=max(Out_Stamp-In_Stamp)"}&lt;/P&gt;&lt;P&gt;&amp;gt;}&lt;/P&gt;&lt;P&gt;Out_Stamp-In_Stamp)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See also: &lt;A href="https://community.qlik.com/qlik-blogpost/4669"&gt;Set Analysis in the Aggr function&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jul 2016 05:31:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-without-result-although-unique-result-possible-via/m-p/1143239#M896835</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2016-07-26T05:31:29Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis without result although unique result possible via UI</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-without-result-although-unique-result-possible-via/m-p/1143240#M896836</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Markus,&lt;/P&gt;&lt;P&gt;always good to have a refresher from HICs excellent blogs.&lt;/P&gt;&lt;P&gt;I checked against these blogs but could not find the issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Guys,&lt;/P&gt;&lt;P&gt;I added an example. I also textboxed concats of StorageNo and Fruit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is about:&lt;/P&gt;&lt;P&gt;=avg(&lt;/P&gt;&lt;P&gt;{$&amp;lt;Color -= {Yellow}&lt;/P&gt;&lt;P&gt;,Fruit={"=rank(aggr(max(Out_Stamp-In_Stamp),Fruit),1)&amp;lt;=$(vRank)"}&lt;/P&gt;&lt;P&gt;,StorageNo={"=max(aggr(max(Out_Stamp-In_Stamp),StorageNo))"}&lt;/P&gt;&lt;P&gt;&amp;gt;}&lt;/P&gt;&lt;P&gt;Out_Stamp-In_Stamp)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I changed the search expression for StorageNo.&lt;/P&gt;&lt;P&gt;Still there is no result and interestingly there are wrong results for StorageNo and Fruit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The result of vRank = 1 should be 13.7 days, Apple, 2 (Fruit, StorageNo) and&lt;/P&gt;&lt;P&gt;for vRank = 2 it should be 8.7 days with Apple,2 and Cherries,1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for any help.&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Andreas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Jul 2016 13:46:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-without-result-although-unique-result-possible-via/m-p/1143240#M896836</guid>
      <dc:creator>andreas_koehler</dc:creator>
      <dc:date>2016-07-27T13:46:50Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis without result although unique result possible via UI</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-without-result-although-unique-result-possible-via/m-p/1143241#M896837</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How about this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=Avg(&lt;/STRONG&gt;&lt;STRONG&gt;{$&amp;lt;Color -= {Yellow}&lt;/STRONG&gt;&lt;STRONG style="font-size: 10pt; line-height: 1.5em;"&gt;, Fruit = {"=Rank(Aggr(Max(&lt;SPAN style="color: #ff0000;"&gt;{&amp;lt;Color -= {Yellow}&amp;gt;} &lt;/SPAN&gt;Out_Stamp-In_Stamp), Fruit), 1) &amp;lt;= $(vRank)"}&lt;/STRONG&gt;&lt;STRONG style="font-size: 10pt; line-height: 1.5em;"&gt;, StorageNo = {"=Max({&lt;SPAN style="color: #ff0000;"&gt;&amp;lt;Color -= {Yellow}&amp;gt;} &lt;SPAN style="color: #575757;"&gt;A&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #575757;"&gt;ggr(M&lt;/SPAN&gt;ax(&lt;SPAN style="color: #ff0000;"&gt;{&amp;lt;Color -= {Yellow}&amp;gt;} &lt;/SPAN&gt;Out_Stamp-In_Stamp), StorageNo))"}&lt;/STRONG&gt;&lt;STRONG style="font-size: 10pt; line-height: 1.5em;"&gt;&amp;gt;} &lt;/STRONG&gt;&lt;STRONG style="font-size: 10pt; line-height: 1.5em;"&gt;Out_Stamp-In_Stamp)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/132752_Capture.PNG" style="height: auto;" /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-2" src="https://community.qlik.com/legacyfs/online/132753_Capture.PNG" style="height: auto;" /&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Jul 2016 20:32:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-without-result-although-unique-result-possible-via/m-p/1143241#M896837</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-07-27T20:32:05Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis without result although unique result possible via UI</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-without-result-although-unique-result-possible-via/m-p/1143242#M896838</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sunny,&lt;/P&gt;&lt;P&gt;thanks for this solution. My mistake that I was not really able to relate HICs comment in &lt;A href="https://community.qlik.com/qlik-blogpost/4418"&gt;Pitfalls of the Aggr function&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;So, there are both inner and outer aggregation functions. Where do I put my Set Analysis expression?&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;The answer is “In both”. It is usually not enough to have it in only one of the levels.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;to this problem. This was a real eye opener to me.&lt;/P&gt;&lt;P&gt;[EDIT]&lt;/P&gt;&lt;P&gt;While it is a solution for the example it does not resolve the real case. I hope you are&amp;nbsp; okay me we leaving this as unresolved.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Jul 2016 20:47:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-without-result-although-unique-result-possible-via/m-p/1143242#M896838</guid>
      <dc:creator>andreas_koehler</dc:creator>
      <dc:date>2016-07-27T20:47:59Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis without result although unique result possible via UI</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-without-result-although-unique-result-possible-via/m-p/1143243#M896839</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;And there is seldom a reason to use aggr() at all in the advanced search of a field modifier, especially when grouping by the set modifier field itself.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Avg(&lt;/P&gt;&lt;P&gt;{$&amp;lt;Color -= {Yellow}, Fruit = {"=Rank(Max({&amp;lt;Color -= {Yellow}&amp;gt;} Out_Stamp-In_Stamp), 1) &amp;lt;= $(vRank)"}&lt;/P&gt;&lt;P&gt;,StorageNo = {"=Sum({&amp;lt;Color -= {Yellow}&amp;gt;} Out_Stamp-In_Stamp)"} &amp;gt;}&lt;/P&gt;&lt;P&gt; Out_Stamp-In_Stamp)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Should return the same (without really understanding what you are trying to accomplish, haven't read all of the posts).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Jul 2016 21:02:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-without-result-although-unique-result-possible-via/m-p/1143243#M896839</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-07-27T21:02:42Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis without result although unique result possible via UI</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-without-result-although-unique-result-possible-via/m-p/1143244#M896840</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I started like this but ran into a problem as I did not include the set modifier for Color into the one for Fruit and StorageNo. My false assumption was that I have to create the aggr() in the search expression.&lt;/P&gt;&lt;P&gt;Thanks Stefan for correcting this.&lt;/P&gt;&lt;P&gt;[Edit]&lt;/P&gt;&lt;P&gt;While your solution works nicely in the example, it does not give the correct result in the real application. The second set (StorageNo) seems to have no effect.If I limit it by a list box, I get the correct result.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Jul 2016 22:29:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-without-result-although-unique-result-possible-via/m-p/1143244#M896840</guid>
      <dc:creator>andreas_koehler</dc:creator>
      <dc:date>2016-07-27T22:29:15Z</dc:date>
    </item>
  </channel>
</rss>

