<?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 Share giving problem in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Calculating-Share-giving-problem/m-p/366164#M493874</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 used this expression&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(MetricName='NRx Share',&lt;/P&gt;&lt;P&gt;(Sum(Volume)/&lt;/P&gt;&lt;P&gt;aggr(NODISTINCT Sum({&amp;lt;PRODUCT_NAME=&amp;gt;} Volume),MONTH_NAME)))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it works fine&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 24 Apr 2012 15:17:46 GMT</pubDate>
    <dc:creator>udaya_kumar</dc:creator>
    <dc:date>2012-04-24T15:17:46Z</dc:date>
    <item>
      <title>Calculating Share giving problem</title>
      <link>https://community.qlik.com/t5/QlikView/Calculating-Share-giving-problem/m-p/366161#M493871</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 have calculated share using the expression,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=sum(Volume) / sum(total&amp;lt;MONTH_NAME,MARKET_NAME&amp;gt; Volume)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the table shows the share for all the products in the market.&lt;/P&gt;&lt;P&gt;when i select some products, then share calculated among those selected products for a given month and given market.&lt;/P&gt;&lt;P&gt;i dont want it to calculate share among those products, i want share to be calculated for all the products.&lt;/P&gt;&lt;P&gt;ex;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" cellpadding="3" cellspacing="0" class="jiveBorder" style="width: 100%; border: 1px solid #000000;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;Product Name&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;Share&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Hum&lt;/TD&gt;&lt;TD&gt;60%&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Enb&lt;/TD&gt;&lt;TD&gt;20%&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Ste&lt;/TD&gt;&lt;TD&gt;-&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Sim&lt;/TD&gt;&lt;TD&gt;20%&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so if i unselect Enb from the product list, the share should show like this&lt;/P&gt;&lt;P&gt;Hum-60%&lt;/P&gt;&lt;P&gt;Sim-20%&lt;/P&gt;&lt;P&gt;Ste- -,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It should &lt;SPAN style="text-decoration: underline; font-family: 'arial black', 'avant garde'; font-size: 12pt;"&gt;&lt;STRONG&gt;not&lt;/STRONG&gt;&lt;/SPAN&gt; show like this&lt;/P&gt;&lt;P&gt;Hum-70%&lt;/P&gt;&lt;P&gt;Sim-30%&lt;/P&gt;&lt;P&gt;Ste--&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so how to change the expression, so that i will get like this&lt;/P&gt;&lt;P&gt;Hum-60%&lt;/P&gt;&lt;P&gt;Sim-20%&lt;/P&gt;&lt;P&gt;Ste- -,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Apr 2012 14:15:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculating-Share-giving-problem/m-p/366161#M493871</guid>
      <dc:creator>udaya_kumar</dc:creator>
      <dc:date>2012-04-24T14:15:55Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating Share giving problem</title>
      <link>https://community.qlik.com/t5/QlikView/Calculating-Share-giving-problem/m-p/366162#M493872</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt; I think the expression should look something like this: sum(volume/sum(total {&amp;lt;product=&amp;gt;} volume). See example below. You should be able to add in the month if need be. I believe this logic is covered in "set modifiers" in the reference manual. You can set the value of product to be a specific value or to be all values, regardless of selections. Examples would be: sum(volume/sum(total {&amp;lt;product={'a'}&amp;gt;} volume) or the one above.&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;&lt;DIV&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Apr 2012 14:41:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculating-Share-giving-problem/m-p/366162#M493872</guid>
      <dc:creator />
      <dc:date>2012-04-24T14:41:57Z</dc:date>
    </item>
    <item>
      <title>Calculating Share giving problem</title>
      <link>https://community.qlik.com/t5/QlikView/Calculating-Share-giving-problem/m-p/366163#M493873</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;Can you attach sample file that you are working.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try calculating the Total and store it in variable and use this variable in expression like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;your variable should be&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vTotalValue = Sum({1} Volume)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, now total is calculated, this value is used in expression like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=sum(Volume)/vTotalValue&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now you will get the result as you expected.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jagan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Apr 2012 14:46:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculating-Share-giving-problem/m-p/366163#M493873</guid>
      <dc:creator>jagan</dc:creator>
      <dc:date>2012-04-24T14:46:16Z</dc:date>
    </item>
    <item>
      <title>Calculating Share giving problem</title>
      <link>https://community.qlik.com/t5/QlikView/Calculating-Share-giving-problem/m-p/366164#M493874</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 used this expression&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(MetricName='NRx Share',&lt;/P&gt;&lt;P&gt;(Sum(Volume)/&lt;/P&gt;&lt;P&gt;aggr(NODISTINCT Sum({&amp;lt;PRODUCT_NAME=&amp;gt;} Volume),MONTH_NAME)))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it works fine&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Apr 2012 15:17:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculating-Share-giving-problem/m-p/366164#M493874</guid>
      <dc:creator>udaya_kumar</dc:creator>
      <dc:date>2012-04-24T15:17:46Z</dc:date>
    </item>
  </channel>
</rss>

