<?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 Artificial Dimensions or/and Set Analysis Expression in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Artificial-Dimensions-or-and-Set-Analysis-Expression/m-p/355940#M1172669</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Hey all, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;i have a very strange problem with my expression - it counts properly only in some cases, not all the time. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;for example if Y = 0, it counts properly, &lt;/P&gt;&lt;P&gt;and if i selected some lines within a listbox, it counts also properly.&lt;/P&gt;&lt;P&gt;But if i change the Y value , it counts wrong. i've checked it with my sql statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;The expression is: &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;= &lt;SPAN style="color: #0000ff;"&gt;count&lt;/SPAN&gt;( &lt;SPAN style="color: #0000ff;"&gt;if&lt;/SPAN&gt; (&lt;SPAN style="color: #800000;"&gt;RELGEWICHT&lt;/SPAN&gt;&amp;gt;=&lt;STRONG&gt;&lt;EM style=": ; color: #808080;"&gt;X&lt;/EM&gt;&lt;/STRONG&gt; &lt;SPAN style="color: #0000ff;"&gt;and&lt;/SPAN&gt;&amp;nbsp; &lt;SPAN style="color: #0000ff;"&gt;aggr&lt;/SPAN&gt;( &lt;SPAN style="color: #0000ff;"&gt;noDISTINCT&lt;/SPAN&gt;&amp;nbsp; &lt;SPAN style="color: #0000ff;"&gt;Count&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;FALLNR&lt;/SPAN&gt;), &lt;SPAN style="color: #800000;"&gt;DRG3&lt;/SPAN&gt;)&amp;gt;=&lt;STRONG&gt;&lt;EM style=": ; color: #808080;"&gt;Y&lt;/EM&gt;&lt;/STRONG&gt; &lt;SPAN style="color: #0000ff;"&gt;and&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;[AUFNGRUND ZUSATZ]&lt;/SPAN&gt;= '07', 1))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;The SQL Statement i'm using to compare the results is like that : &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Temp_Table:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;select DRG3&lt;SPAN style="color: #808080;"&gt;,&lt;/SPAN&gt; &lt;SPAN style="color: #ff00ff;"&gt;COUNT&lt;/SPAN&gt;&lt;SPAN style="color: #808080;"&gt;(*)&lt;/SPAN&gt; &lt;SPAN style="color: #0000ff;"&gt;as&lt;/SPAN&gt; Number&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;from Data_Table&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;where&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [AUFNGRUND ZUSATZ] &lt;SPAN style="color: #808080;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;'07'&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; and&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #800000;"&gt;RELGEWICHT&lt;/SPAN&gt;&amp;gt;=&lt;STRONG&gt;&lt;EM style=": ; color: #808080;"&gt;X&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;group &lt;SPAN style="color: #0000ff;"&gt;by&lt;/SPAN&gt; DRG&lt;SPAN style="color: #808080;"&gt;)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;having &lt;SPAN style="color: #ff00ff;"&gt;COUNT (&lt;/SPAN&gt;DRG3&lt;SPAN style="color: #808080;"&gt;)&amp;gt;=&lt;/SPAN&gt;20&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;SPAN style="color: #808080;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;select &lt;SPAN style="color: #ff00ff;"&gt;SUM&lt;/SPAN&gt;&lt;SPAN style="color: #808080;"&gt;(Number&lt;/SPAN&gt;&lt;SPAN style="color: #808080;"&gt;)&lt;/SPAN&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;SPAN style="color: #0000ff;"&gt;from&lt;/SPAN&gt; temp_table&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As you can see, all i want is to count the number of lines , wich have following properties:&lt;/P&gt;&lt;P&gt;a) &lt;SPAN style="color: #800000;"&gt;RELGEWICHT&lt;/SPAN&gt;&amp;gt;=&lt;STRONG&gt;&lt;EM style=": ; color: #808080;"&gt;X&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #800000;"&gt;b) [AUFNGRUND ZUSATZ]&lt;/SPAN&gt;= '07'&lt;/P&gt;&lt;P&gt;c) that lines are only in scope if we have Y or more lines of that kind, see having clause in SQL and aggr() in the expression&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080;"&gt;Can anyone help, please ? &lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080;"&gt;Regards, alex&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 16 Jun 2012 20:35:34 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-06-16T20:35:34Z</dc:date>
    <item>
      <title>Artificial Dimensions or/and Set Analysis Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Artificial-Dimensions-or-and-Set-Analysis-Expression/m-p/355940#M1172669</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Hey all, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;i have a very strange problem with my expression - it counts properly only in some cases, not all the time. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;for example if Y = 0, it counts properly, &lt;/P&gt;&lt;P&gt;and if i selected some lines within a listbox, it counts also properly.&lt;/P&gt;&lt;P&gt;But if i change the Y value , it counts wrong. i've checked it with my sql statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;The expression is: &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;= &lt;SPAN style="color: #0000ff;"&gt;count&lt;/SPAN&gt;( &lt;SPAN style="color: #0000ff;"&gt;if&lt;/SPAN&gt; (&lt;SPAN style="color: #800000;"&gt;RELGEWICHT&lt;/SPAN&gt;&amp;gt;=&lt;STRONG&gt;&lt;EM style=": ; color: #808080;"&gt;X&lt;/EM&gt;&lt;/STRONG&gt; &lt;SPAN style="color: #0000ff;"&gt;and&lt;/SPAN&gt;&amp;nbsp; &lt;SPAN style="color: #0000ff;"&gt;aggr&lt;/SPAN&gt;( &lt;SPAN style="color: #0000ff;"&gt;noDISTINCT&lt;/SPAN&gt;&amp;nbsp; &lt;SPAN style="color: #0000ff;"&gt;Count&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;FALLNR&lt;/SPAN&gt;), &lt;SPAN style="color: #800000;"&gt;DRG3&lt;/SPAN&gt;)&amp;gt;=&lt;STRONG&gt;&lt;EM style=": ; color: #808080;"&gt;Y&lt;/EM&gt;&lt;/STRONG&gt; &lt;SPAN style="color: #0000ff;"&gt;and&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;[AUFNGRUND ZUSATZ]&lt;/SPAN&gt;= '07', 1))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;The SQL Statement i'm using to compare the results is like that : &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Temp_Table:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;select DRG3&lt;SPAN style="color: #808080;"&gt;,&lt;/SPAN&gt; &lt;SPAN style="color: #ff00ff;"&gt;COUNT&lt;/SPAN&gt;&lt;SPAN style="color: #808080;"&gt;(*)&lt;/SPAN&gt; &lt;SPAN style="color: #0000ff;"&gt;as&lt;/SPAN&gt; Number&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;from Data_Table&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;where&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [AUFNGRUND ZUSATZ] &lt;SPAN style="color: #808080;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;'07'&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; and&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #800000;"&gt;RELGEWICHT&lt;/SPAN&gt;&amp;gt;=&lt;STRONG&gt;&lt;EM style=": ; color: #808080;"&gt;X&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;group &lt;SPAN style="color: #0000ff;"&gt;by&lt;/SPAN&gt; DRG&lt;SPAN style="color: #808080;"&gt;)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;having &lt;SPAN style="color: #ff00ff;"&gt;COUNT (&lt;/SPAN&gt;DRG3&lt;SPAN style="color: #808080;"&gt;)&amp;gt;=&lt;/SPAN&gt;20&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;SPAN style="color: #808080;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;select &lt;SPAN style="color: #ff00ff;"&gt;SUM&lt;/SPAN&gt;&lt;SPAN style="color: #808080;"&gt;(Number&lt;/SPAN&gt;&lt;SPAN style="color: #808080;"&gt;)&lt;/SPAN&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;SPAN style="color: #0000ff;"&gt;from&lt;/SPAN&gt; temp_table&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As you can see, all i want is to count the number of lines , wich have following properties:&lt;/P&gt;&lt;P&gt;a) &lt;SPAN style="color: #800000;"&gt;RELGEWICHT&lt;/SPAN&gt;&amp;gt;=&lt;STRONG&gt;&lt;EM style=": ; color: #808080;"&gt;X&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #800000;"&gt;b) [AUFNGRUND ZUSATZ]&lt;/SPAN&gt;= '07'&lt;/P&gt;&lt;P&gt;c) that lines are only in scope if we have Y or more lines of that kind, see having clause in SQL and aggr() in the expression&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080;"&gt;Can anyone help, please ? &lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080;"&gt;Regards, alex&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 16 Jun 2012 20:35:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Artificial-Dimensions-or-and-Set-Analysis-Expression/m-p/355940#M1172669</guid>
      <dc:creator />
      <dc:date>2012-06-16T20:35:34Z</dc:date>
    </item>
    <item>
      <title>Re: Artificial Dimensions or/and Set Analysis Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Artificial-Dimensions-or-and-Set-Analysis-Expression/m-p/355941#M1172670</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Alexey,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tricky to answer this one without any application to test on &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;Here's an expression that might be close to what you're trying to do:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum({$&amp;lt;RELGEWICHT={"&amp;gt;X"}, [AUFNGRUND ZUSATZ]={'07'}&amp;gt;} if(Aggr(Count(FALLNR),DRG3)&amp;gt;=Y,Aggr(Count(FALLNR),DRG3))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using Set Analysis we set RELGEWICHT to be larger than X and AUFNGRUND ZUSATZ to 07.&lt;/P&gt;&lt;P&gt;Then we look at whether the aggregated count of FALLNR per DRG3 is equal to or larger than Y. If this is true, use the count and the Sum() on the outside of the expression we sum up all these counts that fall within the scope.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Haven't tested the expression in QlikView so there might be some syntax issues with the set analysis and expression logic.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jun 2012 03:53:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Artificial-Dimensions-or-and-Set-Analysis-Expression/m-p/355941#M1172670</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-06-18T03:53:27Z</dc:date>
    </item>
  </channel>
</rss>

