<?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 Leadership Calculation in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Leadership-Calculation/m-p/1079798#M634779</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 can't get my head around this problem and would gladly get some fresh idea to try to help me.&lt;/P&gt;&lt;P&gt;Here is the description of the problem:&lt;/P&gt;&lt;P&gt;I have company based on a certain zipcode that sells in their zipcode, but other zipcode as well.&lt;/P&gt;&lt;P&gt;I want to calculate the number of objets sold in the flower (their zipcode + zipcode adj), but i can not manage to do it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is my test load script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Company:&lt;/P&gt;&lt;P&gt;LOAD * Inline [&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Company&lt;/SPAN&gt;,Zipcode&lt;/P&gt;&lt;P&gt;A,1000&lt;/P&gt;&lt;P&gt;B,2000&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ZipcodeAdj:&lt;/P&gt;&lt;P&gt;LOAD * Inline [&lt;/P&gt;&lt;P&gt;Zipcode,ZipcodeAdj&lt;/P&gt;&lt;P&gt;1000,1001&lt;/P&gt;&lt;P&gt;2000,2001&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Flower:&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;LOAD * Inline [&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Zipcode,&lt;SPAN style="font-size: 13.3333px;"&gt;Flower&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;1000,1000&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;1000,1001&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;2000,2000&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;2000,2001&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;];&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P&gt;Sales:&lt;/P&gt;&lt;P&gt;LOAD * Inline [&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Company&lt;/SPAN&gt;,&lt;SPAN style="font-size: 13.3333px;"&gt;SaleZipcode&lt;/SPAN&gt;,Sales&lt;/P&gt;&lt;P&gt;A,1000,10&lt;/P&gt;&lt;P&gt;A,1001,5&lt;/P&gt;&lt;P&gt;A,2000,1&lt;/P&gt;&lt;P&gt;A,2001,2&lt;/P&gt;&lt;P&gt;B,2000,20&lt;/P&gt;&lt;P&gt;B,2001,10&lt;/P&gt;&lt;P&gt;B,1000,2&lt;/P&gt;&lt;P&gt;B,1001,1&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then i create a chart (straight table).&lt;/P&gt;&lt;P&gt;What i want to see in this table is :&lt;/P&gt;&lt;P&gt;Company,Flower,[Number of Sales In Flower]&lt;/P&gt;&lt;P&gt;A,1000/1001,15&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;B,2000/2001,30&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But what i get when i create the table is:&lt;/P&gt;&lt;P&gt;A,1000/1001,18&lt;/P&gt;&lt;P&gt;B,2000/2001,33&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is my expression :&lt;/P&gt;&lt;P&gt;=sum( {&amp;lt;&lt;SPAN style="font-size: 13.3333px;"&gt;SaleZipcode&lt;/SPAN&gt;={$(=concat(DISTINCT &lt;SPAN style="font-size: 13.3333px;"&gt;Flower&lt;/SPAN&gt;,','))}&amp;gt;} &lt;SPAN style="font-size: 13.3333px;"&gt;Sales&lt;/SPAN&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can not manage to filter this result by company in the straight table.&lt;/P&gt;&lt;P&gt;It is like the dimension company is ignored when qlikview does his calculation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind Regards,&lt;/P&gt;&lt;P&gt;Alexis&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 05 May 2016 08:37:47 GMT</pubDate>
    <dc:creator />
    <dc:date>2016-05-05T08:37:47Z</dc:date>
    <item>
      <title>Leadership Calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Leadership-Calculation/m-p/1079798#M634779</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 can't get my head around this problem and would gladly get some fresh idea to try to help me.&lt;/P&gt;&lt;P&gt;Here is the description of the problem:&lt;/P&gt;&lt;P&gt;I have company based on a certain zipcode that sells in their zipcode, but other zipcode as well.&lt;/P&gt;&lt;P&gt;I want to calculate the number of objets sold in the flower (their zipcode + zipcode adj), but i can not manage to do it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is my test load script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Company:&lt;/P&gt;&lt;P&gt;LOAD * Inline [&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Company&lt;/SPAN&gt;,Zipcode&lt;/P&gt;&lt;P&gt;A,1000&lt;/P&gt;&lt;P&gt;B,2000&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ZipcodeAdj:&lt;/P&gt;&lt;P&gt;LOAD * Inline [&lt;/P&gt;&lt;P&gt;Zipcode,ZipcodeAdj&lt;/P&gt;&lt;P&gt;1000,1001&lt;/P&gt;&lt;P&gt;2000,2001&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Flower:&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;LOAD * Inline [&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Zipcode,&lt;SPAN style="font-size: 13.3333px;"&gt;Flower&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;1000,1000&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;1000,1001&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;2000,2000&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;2000,2001&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;];&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P&gt;Sales:&lt;/P&gt;&lt;P&gt;LOAD * Inline [&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Company&lt;/SPAN&gt;,&lt;SPAN style="font-size: 13.3333px;"&gt;SaleZipcode&lt;/SPAN&gt;,Sales&lt;/P&gt;&lt;P&gt;A,1000,10&lt;/P&gt;&lt;P&gt;A,1001,5&lt;/P&gt;&lt;P&gt;A,2000,1&lt;/P&gt;&lt;P&gt;A,2001,2&lt;/P&gt;&lt;P&gt;B,2000,20&lt;/P&gt;&lt;P&gt;B,2001,10&lt;/P&gt;&lt;P&gt;B,1000,2&lt;/P&gt;&lt;P&gt;B,1001,1&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then i create a chart (straight table).&lt;/P&gt;&lt;P&gt;What i want to see in this table is :&lt;/P&gt;&lt;P&gt;Company,Flower,[Number of Sales In Flower]&lt;/P&gt;&lt;P&gt;A,1000/1001,15&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;B,2000/2001,30&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But what i get when i create the table is:&lt;/P&gt;&lt;P&gt;A,1000/1001,18&lt;/P&gt;&lt;P&gt;B,2000/2001,33&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is my expression :&lt;/P&gt;&lt;P&gt;=sum( {&amp;lt;&lt;SPAN style="font-size: 13.3333px;"&gt;SaleZipcode&lt;/SPAN&gt;={$(=concat(DISTINCT &lt;SPAN style="font-size: 13.3333px;"&gt;Flower&lt;/SPAN&gt;,','))}&amp;gt;} &lt;SPAN style="font-size: 13.3333px;"&gt;Sales&lt;/SPAN&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can not manage to filter this result by company in the straight table.&lt;/P&gt;&lt;P&gt;It is like the dimension company is ignored when qlikview does his calculation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind Regards,&lt;/P&gt;&lt;P&gt;Alexis&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 May 2016 08:37:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Leadership-Calculation/m-p/1079798#M634779</guid>
      <dc:creator />
      <dc:date>2016-05-05T08:37:47Z</dc:date>
    </item>
    <item>
      <title>Re: Leadership Calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Leadership-Calculation/m-p/1079799#M634782</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try with this expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=Sum(Aggr(If(Match(SaleZipcode, Flower), Sales), Company, Flower, SaleZipcode))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The issue is that the set analysis is evaluated once per chart. The statement you had within your set analysis included all the Flower and hence it was summing all the sales for the company. With the Aggr(If()) you can do this more dynamically&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/123695_Capture.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 May 2016 15:35:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Leadership-Calculation/m-p/1079799#M634782</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-05-05T15:35:14Z</dc:date>
    </item>
    <item>
      <title>Re: Leadership Calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Leadership-Calculation/m-p/1079800#M634784</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It works like a charm.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks Sunny! &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 May 2016 16:21:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Leadership-Calculation/m-p/1079800#M634784</guid>
      <dc:creator />
      <dc:date>2016-05-05T16:21:55Z</dc:date>
    </item>
  </channel>
</rss>

