<?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 the sales penetration in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Calculating-the-sales-penetration/m-p/1768388#M455204</link>
    <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I have a strange problem for which i am having a very hard time in terms of how to display in qlik.&lt;/P&gt;&lt;P&gt;basically i have Revenue data by country, province/state, Salesman, customer and customer type&lt;/P&gt;&lt;P&gt;I want to calculate the Sales penetration which is simply put (Revenue/population)&lt;/P&gt;&lt;P&gt;the problem comes in where different levels of granularity is selected.&lt;/P&gt;&lt;P&gt;for example if data is filtered on a province, then all the revenue for the customers in that province is summarized but the population should not be summarized. i.e. sum(Rev C1+ Rev C2)/Prov population&lt;/P&gt;&lt;P&gt;but say the data is filtered on a customer that is selling across 2 provinces then the calculation would be (Rev Prov1+ Rev Prov 2)/(pop prov1+ pop prov 2)&amp;nbsp;&lt;/P&gt;&lt;P&gt;the problem is how to calculate the population in the formula as revenue is summarized but population depends on the demographic that is being calculated upon.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i have added the sample data just to explain it better.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;please help as i am desperate&lt;/P&gt;</description>
    <pubDate>Mon, 14 Dec 2020 21:20:29 GMT</pubDate>
    <dc:creator>Jagveer</dc:creator>
    <dc:date>2020-12-14T21:20:29Z</dc:date>
    <item>
      <title>Calculating the sales penetration</title>
      <link>https://community.qlik.com/t5/QlikView/Calculating-the-sales-penetration/m-p/1768388#M455204</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I have a strange problem for which i am having a very hard time in terms of how to display in qlik.&lt;/P&gt;&lt;P&gt;basically i have Revenue data by country, province/state, Salesman, customer and customer type&lt;/P&gt;&lt;P&gt;I want to calculate the Sales penetration which is simply put (Revenue/population)&lt;/P&gt;&lt;P&gt;the problem comes in where different levels of granularity is selected.&lt;/P&gt;&lt;P&gt;for example if data is filtered on a province, then all the revenue for the customers in that province is summarized but the population should not be summarized. i.e. sum(Rev C1+ Rev C2)/Prov population&lt;/P&gt;&lt;P&gt;but say the data is filtered on a customer that is selling across 2 provinces then the calculation would be (Rev Prov1+ Rev Prov 2)/(pop prov1+ pop prov 2)&amp;nbsp;&lt;/P&gt;&lt;P&gt;the problem is how to calculate the population in the formula as revenue is summarized but population depends on the demographic that is being calculated upon.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i have added the sample data just to explain it better.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;please help as i am desperate&lt;/P&gt;</description>
      <pubDate>Mon, 14 Dec 2020 21:20:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculating-the-sales-penetration/m-p/1768388#M455204</guid>
      <dc:creator>Jagveer</dc:creator>
      <dc:date>2020-12-14T21:20:29Z</dc:date>
    </item>
    <item>
      <title>Re: Show only Current Month Data in Charts</title>
      <link>https://community.qlik.com/t5/QlikView/Calculating-the-sales-penetration/m-p/1768404#M455206</link>
      <description>&lt;P&gt;The proper way to handle this would be to keep the Revenue and Population as separate tables in your data model/load script, which would prevent the Populations from being duplicated.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Data:
LOAD * INLINE [
Country,Salesman,Province,Customer Type,Customer,Population,Revenue 
US,S1,Alabama,National,C1,4903185,500000 
US,S1,New jersey,National,C1,8882190,1000000 
US,S1,Kansas,Distributor,C2,2913314,250000 
US,S2,Kansas,Distributor,C3,2913314,375000 
US,S2,Kansas,Retailer,C4,2913314,100000 
US,S3,Pennsylvania,Distributor,C5,12801989,1250000 
Canada,S4,Ontario,National,C6,14570000,2000000 
Canada,S4,Alberta,National,C6,4371000,1500000 
];


Revenue:
LOAD Country, Salesman, Province, [Customer Type], [Customer], Revenue
RESIDENT Data;

Population:
LOAD DISTINCT Province, Population
RESIDENT Data;

DROP TABLE Data;&lt;/LI-CODE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Nicole-Smith_0-1607984802748.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/45641iE646522E9F56DC14/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Nicole-Smith_0-1607984802748.png" alt="Nicole-Smith_0-1607984802748.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Nicole-Smith_1-1607984829515.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/45642iFFDB45AB100CC1D5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Nicole-Smith_1-1607984829515.png" alt="Nicole-Smith_1-1607984829515.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;As you can see, my numbers match what you want with a simple sum(Revenue)/sum(Population).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Dec 2020 22:27:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculating-the-sales-penetration/m-p/1768404#M455206</guid>
      <dc:creator>Nicole-Smith</dc:creator>
      <dc:date>2020-12-14T22:27:52Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating the sales penetration</title>
      <link>https://community.qlik.com/t5/QlikView/Calculating-the-sales-penetration/m-p/1768405#M455205</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/83800"&gt;@Jagveer&lt;/a&gt;&amp;nbsp; how you want to present the data?&amp;nbsp; I mean which chart? what will be the dimensions and measures?&lt;/P&gt;</description>
      <pubDate>Mon, 14 Dec 2020 22:28:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculating-the-sales-penetration/m-p/1768405#M455205</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2020-12-14T22:28:13Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating the sales penetration</title>
      <link>https://community.qlik.com/t5/QlikView/Calculating-the-sales-penetration/m-p/1768409#M455207</link>
      <description>&lt;P&gt;There are multiple views but for starters&lt;/P&gt;&lt;P&gt;Market penetration for 2 years on a stacked bar chart by customer type one bar for each year under each customer type&lt;/P&gt;</description>
      <pubDate>Mon, 14 Dec 2020 22:40:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculating-the-sales-penetration/m-p/1768409#M455207</guid>
      <dc:creator>Jagveer</dc:creator>
      <dc:date>2020-12-14T22:40:40Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating the sales penetration</title>
      <link>https://community.qlik.com/t5/QlikView/Calculating-the-sales-penetration/m-p/1768414#M455208</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/83800"&gt;@Jagveer&lt;/a&gt;&amp;nbsp; try below expression&lt;/P&gt;&lt;P&gt;=sum(Revenue)/ sum(aggr(max(Population),Country,Province))&lt;/P&gt;</description>
      <pubDate>Mon, 14 Dec 2020 23:08:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculating-the-sales-penetration/m-p/1768414#M455208</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2020-12-14T23:08:38Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating the sales penetration</title>
      <link>https://community.qlik.com/t5/QlikView/Calculating-the-sales-penetration/m-p/1768651#M455209</link>
      <description>&lt;P&gt;Hi Kush,&lt;/P&gt;&lt;P&gt;Nicole's suggestion worked, but i am still not able to put the graph together. pardon me if this sounds naive but i am just learning Qlik on the go..so if you could help out in that&lt;/P&gt;</description>
      <pubDate>Tue, 15 Dec 2020 15:03:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculating-the-sales-penetration/m-p/1768651#M455209</guid>
      <dc:creator>Jagveer</dc:creator>
      <dc:date>2020-12-15T15:03:01Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating the sales penetration</title>
      <link>https://community.qlik.com/t5/QlikView/Calculating-the-sales-penetration/m-p/1768664#M455210</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/83800"&gt;@Jagveer&lt;/a&gt;&amp;nbsp; you can create the Graph with Dimension Customer Type and Year and then below expression&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;=sum(Revenue)/ sum(aggr(max(Population),Country,Province))&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Dec 2020 15:41:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculating-the-sales-penetration/m-p/1768664#M455210</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2020-12-15T15:41:44Z</dc:date>
    </item>
  </channel>
</rss>

