<?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 Monthly Weighted distribution for a product in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Monthly-Weighted-distribution-for-a-product/m-p/1014991#M344138</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 want to calculate Monthly weighted distribution of a product.&lt;/P&gt;&lt;P&gt;I have Monthly data for various stores. each store is selling multiple products. now if a store is selling say product U then my weighted distribution should be calculated as&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WD = (Total sale of all stores which sold a product U in given month) / Total sales in the given month.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have attached a sample data set and desired output.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help me out to get this calculation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Aashish.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 03 Jan 2016 09:36:32 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2016-01-03T09:36:32Z</dc:date>
    <item>
      <title>Monthly Weighted distribution for a product</title>
      <link>https://community.qlik.com/t5/QlikView/Monthly-Weighted-distribution-for-a-product/m-p/1014991#M344138</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 want to calculate Monthly weighted distribution of a product.&lt;/P&gt;&lt;P&gt;I have Monthly data for various stores. each store is selling multiple products. now if a store is selling say product U then my weighted distribution should be calculated as&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WD = (Total sale of all stores which sold a product U in given month) / Total sales in the given month.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have attached a sample data set and desired output.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help me out to get this calculation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Aashish.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 03 Jan 2016 09:36:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Monthly-Weighted-distribution-for-a-product/m-p/1014991#M344138</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-01-03T09:36:32Z</dc:date>
    </item>
    <item>
      <title>Re: Monthly Weighted distribution for a product</title>
      <link>https://community.qlik.com/t5/QlikView/Monthly-Weighted-distribution-for-a-product/m-p/1014992#M344139</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;Check this,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="sql" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14518321921109868 jive_text_macro" jivemacro_uid="_14518321921109868" modifiedtitle="true"&gt;
&lt;P&gt;Temp:&lt;/P&gt;
&lt;P&gt;LOAD&amp;nbsp; Mid(Period,7,8)&amp;amp;'/'&amp;amp;Mid(Mid(Period,5,6),1,2)&amp;nbsp; &amp;amp;'/'&amp;amp;Mid(Period,1,4)&amp;nbsp; as Date,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Store,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Period,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Product,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Amount&lt;/P&gt;
&lt;P&gt;FROM&lt;/P&gt;
&lt;P&gt;[WD.xlsx]&lt;/P&gt;
&lt;P&gt;(ooxml, embedded labels, table is Sheet1);&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Table:&lt;/P&gt;
&lt;P&gt;Load *,&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Month &lt;/STRONG&gt;(Date) as &lt;EM&gt;Month&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;resident Temp;&lt;/P&gt;
&lt;P&gt;Drop table Temp;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;

&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Output&lt;/STRONG&gt;:&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="110444" alt="Monthwisedistribution.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/110444_Monthwisedistribution.PNG" style="max-width: 620px; height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HTH,&lt;/P&gt;&lt;P&gt;PFA,&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Hirish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 03 Jan 2016 14:37:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Monthly-Weighted-distribution-for-a-product/m-p/1014992#M344139</guid>
      <dc:creator>HirisH_V7</dc:creator>
      <dc:date>2016-01-03T14:37:40Z</dc:date>
    </item>
    <item>
      <title>Re: Monthly Weighted distribution for a product</title>
      <link>https://community.qlik.com/t5/QlikView/Monthly-Weighted-distribution-for-a-product/m-p/1014993#M344140</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think you simply need a chart (Straight Table or a Pivot Table) with Product and Period as Chart Dimension. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The expression should be simply this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum(Sales) / sum( TOTAL &amp;lt;Period&amp;gt; Sales)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With Product and Period used as Chart dimensions, sum(Sales) returns the total sales per Product per Period (across all stores), and the denominator contains the total Sales by Period (across all stores and all products).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can learn in detail how QlikView aggregation works, along with many other QlikView techniques, from my new book &lt;A href="http://www.amazon.com/gp/product/1118949552/ref=as_li_tl?ie=UTF8&amp;amp;camp=1789&amp;amp;creative=9325&amp;amp;creativeASIN=1118949552&amp;amp;linkCode=as2&amp;amp;tag=natursyner0f-20&amp;amp;linkId=IN55M5EPRHLRBWIQ"&gt;QlikView Your Business&lt;/A&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;Take your Qlik Skills to the next level at the &lt;A href="http://masterssummit.com/"&gt;Masters Summit for Qlik&lt;/A&gt; - now with new and redesigned materials!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 03 Jan 2016 18:24:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Monthly-Weighted-distribution-for-a-product/m-p/1014993#M344140</guid>
      <dc:creator>Oleg_Troyansky</dc:creator>
      <dc:date>2016-01-03T18:24:35Z</dc:date>
    </item>
  </channel>
</rss>

