<?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 Using P() and Weighting/Proportion in Set Analysis in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Using-P-and-Weighting-Proportion-in-Set-Analysis/m-p/102582#M457897</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'd like to use weighting/proportions in set analysis with the P() function to weight the variable used in the possible function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EXPRESSION - &lt;SPAN style="font-size: 10pt;"&gt;Readmit Rate % for all patients, per coverage selections:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Sum({1&amp;lt;Coverage=P(Coverage)&amp;gt;}[Numerator])/&lt;SPAN style="font-size: 10pt;"&gt;Sum({1&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Coverage&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;=P(&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Coverage&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;)&amp;gt;}[Denominator])&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Coverage Type:&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;A&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;D&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;N&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;E&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;For example, based on my selections, let's say that the distribution of Coverage Type is the following:&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Current Selections Coverage Type Distribution:&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;A&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 200&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;D&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;N&amp;nbsp;&amp;nbsp;&amp;nbsp; 1000&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;E&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 100&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;The P() works to exclude D from the calculation - however, what if I want to weight/use proportions based on the total?&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Total Coverage Type Distribution:&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;A&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 500&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;D&amp;nbsp;&amp;nbsp;&amp;nbsp; 2000&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;N&amp;nbsp; 10000&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;E&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 200&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Proportion based on Current Selections/Total:&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;A&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 200/500=40%&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;D&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;N&amp;nbsp;&amp;nbsp;&amp;nbsp; 1000/10000=10%&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;E&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 100/200=50%&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Is there any way to account for these proportions in the expression?&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 18 Jul 2018 17:12:33 GMT</pubDate>
    <dc:creator>kmstephenson</dc:creator>
    <dc:date>2018-07-18T17:12:33Z</dc:date>
    <item>
      <title>Using P() and Weighting/Proportion in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Using-P-and-Weighting-Proportion-in-Set-Analysis/m-p/102582#M457897</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'd like to use weighting/proportions in set analysis with the P() function to weight the variable used in the possible function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EXPRESSION - &lt;SPAN style="font-size: 10pt;"&gt;Readmit Rate % for all patients, per coverage selections:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Sum({1&amp;lt;Coverage=P(Coverage)&amp;gt;}[Numerator])/&lt;SPAN style="font-size: 10pt;"&gt;Sum({1&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Coverage&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;=P(&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Coverage&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;)&amp;gt;}[Denominator])&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Coverage Type:&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;A&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;D&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;N&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;E&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;For example, based on my selections, let's say that the distribution of Coverage Type is the following:&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Current Selections Coverage Type Distribution:&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;A&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 200&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;D&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;N&amp;nbsp;&amp;nbsp;&amp;nbsp; 1000&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;E&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 100&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;The P() works to exclude D from the calculation - however, what if I want to weight/use proportions based on the total?&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Total Coverage Type Distribution:&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;A&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 500&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;D&amp;nbsp;&amp;nbsp;&amp;nbsp; 2000&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;N&amp;nbsp; 10000&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;E&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 200&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Proportion based on Current Selections/Total:&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;A&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 200/500=40%&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;D&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;N&amp;nbsp;&amp;nbsp;&amp;nbsp; 1000/10000=10%&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;E&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 100/200=50%&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Is there any way to account for these proportions in the expression?&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jul 2018 17:12:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-P-and-Weighting-Proportion-in-Set-Analysis/m-p/102582#M457897</guid>
      <dc:creator>kmstephenson</dc:creator>
      <dc:date>2018-07-18T17:12:33Z</dc:date>
    </item>
    <item>
      <title>Re: Using P() and Weighting/Proportion in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Using-P-and-Weighting-Proportion-in-Set-Analysis/m-p/102583#M457898</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am not entirely sure I get, but may be you need this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Sum([Numerator])/&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Sum({1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;}[Denominator])&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jul 2018 17:15:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-P-and-Weighting-Proportion-in-Set-Analysis/m-p/102583#M457898</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-07-18T17:15:19Z</dc:date>
    </item>
  </channel>
</rss>

