<?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: Count Percentage in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Count-Percentage/m-p/1136238#M372889</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your simpler model made me think that why are we even using OrderId here, why don't we use this:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;Count(HoldReason)/Count(TOTAL HoldReason)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;and&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;Count(&lt;SPAN style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;CancellationReason&lt;/STRONG&gt;&lt;/SPAN&gt;)/Count(TOTAL &lt;SPAN style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;CancellationReason&lt;/STRONG&gt;&lt;/SPAN&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/133711_Capture.PNG" style="height: 211px; width: 620px;" /&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 05 Aug 2016 00:46:32 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2016-08-05T00:46:32Z</dc:date>
    <item>
      <title>Count Percentage</title>
      <link>https://community.qlik.com/t5/QlikView/Count-Percentage/m-p/1136235#M372886</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a scenario where Where an Order can go through different statuses during it's life time and each status has a reason.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so as an example.. Order can have status 'On Hold' for reason 'Awaiting Payment' and just like this there are many reasons for being on Hold for being cancelled&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to calculate the most popular reasons for Order being on Hold or being Cancelled &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried following formula in the expression but it is not giving desired&amp;nbsp;&amp;nbsp; = &lt;SPAN style="line-height: 1.5em; font-size: 10pt; font-family: 'courier new', courier;"&gt;&lt;SPAN style="color: #0000ff;"&gt;count&lt;/SPAN&gt;(OrderId) / &lt;SPAN style="color: #0000ff;"&gt;count&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff;"&gt;total&lt;/SPAN&gt;(OrderId))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Percentage.png" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/133695_Percentage.png" style="height: 283px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sample QVW attached&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Aug 2016 00:17:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-Percentage/m-p/1136235#M372886</guid>
      <dc:creator />
      <dc:date>2016-08-05T00:17:30Z</dc:date>
    </item>
    <item>
      <title>Re: Count Percentage</title>
      <link>https://community.qlik.com/t5/QlikView/Count-Percentage/m-p/1136236#M372887</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You want this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/133709_Capture.PNG" style="height: 114px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Expression used:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Count({&amp;lt;HoldReason = {'*'}&amp;gt;}OrderId)/Count(TOTAL {&amp;lt;HoldReason = {'*'}&amp;gt;} OrderId)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Count({&amp;lt;CancellationReason = {'*'}&amp;gt;}OrderId)/Count(TOTAL {&amp;lt;CancellationReason = {'*'}&amp;gt;} OrderId)&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Aug 2016 00:31:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-Percentage/m-p/1136236#M372887</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-08-05T00:31:05Z</dc:date>
    </item>
    <item>
      <title>Re: Count Percentage</title>
      <link>https://community.qlik.com/t5/QlikView/Count-Percentage/m-p/1136237#M372888</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try these changes to your expression:&lt;/P&gt;&lt;P&gt;count(OrderId) / count(&lt;STRONG&gt;{$&amp;lt;HoldReason={'*'}&amp;gt;}&lt;/STRONG&gt; total(OrderId))&lt;/P&gt;&lt;P&gt;count(OrderId) / count(&lt;STRONG&gt;{$&amp;lt;CancellationReason={'*'}&amp;gt;}&lt;/STRONG&gt; TOTAL (OrderId))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See attached.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;They produce this:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="cancelled vs held.PNG" class="jive-image image-1" src="/legacyfs/online/133710_cancelled vs held.PNG" style="height: 136px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;Consider using a simpler data-model, only these columns:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Order&lt;/LI&gt;&lt;LI&gt;Status&lt;/LI&gt;&lt;LI&gt;Reason&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That data-model would allow for clearer and/or simpler solution(s)..&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Aug 2016 00:42:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-Percentage/m-p/1136237#M372888</guid>
      <dc:creator />
      <dc:date>2016-08-05T00:42:19Z</dc:date>
    </item>
    <item>
      <title>Re: Count Percentage</title>
      <link>https://community.qlik.com/t5/QlikView/Count-Percentage/m-p/1136238#M372889</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your simpler model made me think that why are we even using OrderId here, why don't we use this:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;Count(HoldReason)/Count(TOTAL HoldReason)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;and&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;Count(&lt;SPAN style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;CancellationReason&lt;/STRONG&gt;&lt;/SPAN&gt;)/Count(TOTAL &lt;SPAN style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;CancellationReason&lt;/STRONG&gt;&lt;/SPAN&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/133711_Capture.PNG" style="height: 211px; width: 620px;" /&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Aug 2016 00:46:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-Percentage/m-p/1136238#M372889</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-08-05T00:46:32Z</dc:date>
    </item>
    <item>
      <title>Re: Count Percentage</title>
      <link>https://community.qlik.com/t5/QlikView/Count-Percentage/m-p/1136239#M372890</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You're right! Of course! But this doesn't even require a simpler model, it works with original model...&lt;/P&gt;&lt;P&gt;The principle is that COUNT() will &lt;STRONG&gt;not&lt;/STRONG&gt; COUNT &lt;STRONG&gt;null&lt;/STRONG&gt; values, right?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good idea; best answer so far &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Aug 2016 17:51:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-Percentage/m-p/1136239#M372890</guid>
      <dc:creator />
      <dc:date>2016-08-05T17:51:40Z</dc:date>
    </item>
  </channel>
</rss>

