<?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 Chi square histogram and dynamic aggregation in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Chi-square-histogram-and-dynamic-aggregation/m-p/992534#M338113</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Everybody,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to build a histogram of p- and chi2-values from a chi square test, that uses a dynamically calculated "Count" column to show possible associations between a pre-selectable risk faktor and a number of diseases as the diagram dimension. It works pretty much fine with static input data (see attached QVW file for an example). The individual level data is not included in the file for privacy reasons.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there *any* way of calculating the "Count" column dynamically - based on the selection of the individual level data? I tried using the "total" keyword and the aggr() function, but couldn't get it going. After some days of trial- and error I hope, that some of you guys can help me! !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;P&gt;Helmut&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 25 Aug 2015 13:02:12 GMT</pubDate>
    <dc:creator />
    <dc:date>2015-08-25T13:02:12Z</dc:date>
    <item>
      <title>Chi square histogram and dynamic aggregation</title>
      <link>https://community.qlik.com/t5/QlikView/Chi-square-histogram-and-dynamic-aggregation/m-p/992534#M338113</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Everybody,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to build a histogram of p- and chi2-values from a chi square test, that uses a dynamically calculated "Count" column to show possible associations between a pre-selectable risk faktor and a number of diseases as the diagram dimension. It works pretty much fine with static input data (see attached QVW file for an example). The individual level data is not included in the file for privacy reasons.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there *any* way of calculating the "Count" column dynamically - based on the selection of the individual level data? I tried using the "total" keyword and the aggr() function, but couldn't get it going. After some days of trial- and error I hope, that some of you guys can help me! !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;P&gt;Helmut&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Aug 2015 13:02:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Chi-square-histogram-and-dynamic-aggregation/m-p/992534#M338113</guid>
      <dc:creator />
      <dc:date>2015-08-25T13:02:12Z</dc:date>
    </item>
    <item>
      <title>Re: Chi square histogram and dynamic aggregation</title>
      <link>https://community.qlik.com/t5/QlikView/Chi-square-histogram-and-dynamic-aggregation/m-p/992535#M338114</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Helmut,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;based on the Help description of the function, you should be able to use the calculated Count, with either the TOTAL qualifier, or using AGGR(). In both cases, you should use your Chart dimension as the aggregation dimension.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'd be happy to show you how to do it, but I need the data that you are going to count. You can either scramble the original data, or simply build a manual mock-up example with the corresponding fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cheers,&lt;/P&gt;&lt;P&gt;Oleg Troyansky&lt;/P&gt;&lt;P&gt;Come to the &lt;A href="http://masterssummit.com/"&gt;Masters Summit for QlikView&lt;/A&gt; and learn Advanced Aggregation and Set Analysis with me!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Aug 2015 15:54:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Chi-square-histogram-and-dynamic-aggregation/m-p/992535#M338114</guid>
      <dc:creator>Oleg_Troyansky</dc:creator>
      <dc:date>2015-08-25T15:54:24Z</dc:date>
    </item>
    <item>
      <title>Re: Chi square histogram and dynamic aggregation</title>
      <link>https://community.qlik.com/t5/QlikView/Chi-square-histogram-and-dynamic-aggregation/m-p/992536#M338115</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Oleg,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks for the fast response. Indeed, that help entry gave me some hope about being able to do what I need, giving the hints for the usage of TOTAL and AGGR, but I couldn't find any detailed information about how nor any examples.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What you write gives me so hope!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I prepared a mock-up example for you (&lt;SPAN style="color: #3778c7; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px; background-color: #fdfdfd;"&gt;ChiSquareHistogram_v2.qvw)&lt;/SPAN&gt;. It contains&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;a chart based on the static occurence counts (trivial, but it shows, how I imagine the result)&lt;/LI&gt;&lt;LI&gt;a second, halfway configured, chart that is supposed to calculate it's p-values based on dynamic occurence counts (which, for instance, can change as the number of selecterd individuals change)&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The second, defunct, chart is the one I need your help on!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;Helmut&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Aug 2015 20:17:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Chi-square-histogram-and-dynamic-aggregation/m-p/992536#M338115</guid>
      <dc:creator />
      <dc:date>2015-08-25T20:17:00Z</dc:date>
    </item>
    <item>
      <title>Re: Chi square histogram and dynamic aggregation</title>
      <link>https://community.qlik.com/t5/QlikView/Chi-square-histogram-and-dynamic-aggregation/m-p/992537#M338116</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here you go. I used AGGR to count the IDs at the same detailed level as the table suggests:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chi2Test_p(&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; DiseasePresent,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; RiskLevel,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; aggr(&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; COUNT(DISTINCT&amp;nbsp; AnonId),&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DiseaseName, DiseasePresent, RiskFactor, RiskLevel)&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cheers,&lt;/P&gt;&lt;P&gt;Oleg Troyansky&lt;/P&gt;&lt;P&gt;Come to the &lt;A href="http://masterssummit.com/"&gt;Masters Summit for QlikView&lt;/A&gt; and learn Advanced Aggregation and Advanced Set Analysis with me!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Aug 2015 21:11:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Chi-square-histogram-and-dynamic-aggregation/m-p/992537#M338116</guid>
      <dc:creator>Oleg_Troyansky</dc:creator>
      <dc:date>2015-08-25T21:11:50Z</dc:date>
    </item>
    <item>
      <title>Re: Chi square histogram and dynamic aggregation</title>
      <link>https://community.qlik.com/t5/QlikView/Chi-square-histogram-and-dynamic-aggregation/m-p/992538#M338117</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Oleg,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;that's great. Exactly what I needed!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My mistake when trying to use the aggr() was that I was trying to find a way to make it deliver just a single column.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a bunch!!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Aug 2015 04:30:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Chi-square-histogram-and-dynamic-aggregation/m-p/992538#M338117</guid>
      <dc:creator />
      <dc:date>2015-08-26T04:30:47Z</dc:date>
    </item>
  </channel>
</rss>

