<?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 Calculating percentage in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Calculating-percentage/m-p/508816#M190154</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using the below formula for calculating the percentage in a bar chart ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Count(distinct(Col1)) / Count(Total&amp;lt;DIM1&amp;gt;distinct Col1)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i need to include an if condition in the above expression to get just ACTIVE Col 1 values&lt;/P&gt;&lt;P&gt;somthing like Count(if(Col2 ='ACTIVE', distinct(Col1) / Count(If(Col2 = 'ACTIVE',.total&amp;lt;.... but not sure how to include this in the total ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can someone please help ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 20 Aug 2013 19:17:39 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2013-08-20T19:17:39Z</dc:date>
    <item>
      <title>Calculating percentage</title>
      <link>https://community.qlik.com/t5/QlikView/Calculating-percentage/m-p/508816#M190154</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using the below formula for calculating the percentage in a bar chart ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Count(distinct(Col1)) / Count(Total&amp;lt;DIM1&amp;gt;distinct Col1)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i need to include an if condition in the above expression to get just ACTIVE Col 1 values&lt;/P&gt;&lt;P&gt;somthing like Count(if(Col2 ='ACTIVE', distinct(Col1) / Count(If(Col2 = 'ACTIVE',.total&amp;lt;.... but not sure how to include this in the total ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can someone please help ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Aug 2013 19:17:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculating-percentage/m-p/508816#M190154</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-08-20T19:17:39Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating percentage</title>
      <link>https://community.qlik.com/t5/QlikView/Calculating-percentage/m-p/508817#M190155</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can try a set expression:&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;"&gt;Count({&amp;lt;Col2 = {ACTIVE}&amp;gt;} distinct(Col1)) / Count(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;{&amp;lt;Col2 = {ACTIVE}&amp;gt;} &lt;/SPAN&gt; Total&amp;lt;DIM1&amp;gt;distinct Col1)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;or with an if():&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Count(distinct if(Col2='ACTIVE',Col1)) / Count(Total&amp;lt;DIM1&amp;gt; distinct if(Col2='ACTIVE',Col1))&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Aug 2013 20:16:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculating-percentage/m-p/508817#M190155</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2013-08-20T20:16:28Z</dc:date>
    </item>
  </channel>
</rss>

