<?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 Re: Analysis expression with sum (help) in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Analysis-expression-with-sum-help/m-p/403274#M490920</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Right, so let's ignore selection in Klant for the total calculation:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;=sum(omzet) / sum(aggr( sum({1} total&amp;lt;landnummer&amp;gt; omzet), landnummer, klant))&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 11 Oct 2012 10:12:36 GMT</pubDate>
    <dc:creator>swuehl</dc:creator>
    <dc:date>2012-10-11T10:12:36Z</dc:date>
    <item>
      <title>Analysis expression with sum (help)</title>
      <link>https://community.qlik.com/t5/QlikView/Analysis-expression-with-sum-help/m-p/403271#M490917</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;Im relative new to Qlikview, so it can be a stupid question&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;Situation:&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;I got a straight table with the dimension "Klant" (&lt;EM&gt;customer in english&lt;/EM&gt;), also i got an expression for the sum of his sales. but the problem now is i want a ratio of that customer with his country. So in fact sum(sales customer) / sum(sales country).&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;Each sales record contains a customerNumber, Country number and a saleprice&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;Problem:&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;I cant get the total of the sales from country, because the dimension is klant (customer) the sales are grouped by customer. im trying to get it by analysis expression but i cant get the right results&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;the expression i have is:&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;=sum(total {1&amp;lt;landnummer= {$(=only({$}landnummer))}&amp;gt;} omzet)&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;translation:&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; landnummer = countrynumber,&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; omzet&amp;nbsp; = salesprice&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;When i split up the two expressions they both works fine:&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;=sum(total {1&amp;lt;landnummer= {1}&amp;gt;} omzet) // returns all sales record from country 1&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;=only({$} landnummer)&amp;nbsp; // returns the country nummber of the record&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;I hope u got all the needed information and sorry for my english (not a native english speaker)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;Thanks in advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Oct 2012 09:35:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Analysis-expression-with-sum-help/m-p/403271#M490917</guid>
      <dc:creator />
      <dc:date>2012-10-11T09:35:53Z</dc:date>
    </item>
    <item>
      <title>Re: Analysis expression with sum (help)</title>
      <link>https://community.qlik.com/t5/QlikView/Analysis-expression-with-sum-help/m-p/403272#M490918</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The set expression is only evaluated once per chart, so it will not take the current landnummer of the current dimension value into account.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try maybe something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;=sum(omzet) / sum(aggr( sum(total&amp;lt;landnummer&amp;gt; omzet), landnummer, klant))&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Oct 2012 09:45:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Analysis-expression-with-sum-help/m-p/403272#M490918</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-10-11T09:45:01Z</dc:date>
    </item>
    <item>
      <title>Re: Analysis expression with sum (help)</title>
      <link>https://community.qlik.com/t5/QlikView/Analysis-expression-with-sum-help/m-p/403273#M490919</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is half&amp;nbsp; correct. It gives the right value back WHEN dont have a selection. The total value become the total for that customer. The problem here is the sum(totalsales country) must be indepentend on the customernumber and may only be dependend on the countrynumber&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Oct 2012 10:03:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Analysis-expression-with-sum-help/m-p/403273#M490919</guid>
      <dc:creator />
      <dc:date>2012-10-11T10:03:34Z</dc:date>
    </item>
    <item>
      <title>Re: Analysis expression with sum (help)</title>
      <link>https://community.qlik.com/t5/QlikView/Analysis-expression-with-sum-help/m-p/403274#M490920</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Right, so let's ignore selection in Klant for the total calculation:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;=sum(omzet) / sum(aggr( sum({1} total&amp;lt;landnummer&amp;gt; omzet), landnummer, klant))&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Oct 2012 10:12:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Analysis-expression-with-sum-help/m-p/403274#M490920</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-10-11T10:12:36Z</dc:date>
    </item>
    <item>
      <title>Re: Analysis expression with sum (help)</title>
      <link>https://community.qlik.com/t5/QlikView/Analysis-expression-with-sum-help/m-p/403275#M490921</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thats it! Thanks very much was breaking my nut over it all morning&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Grtz AbsolutWilot&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Oct 2012 10:16:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Analysis-expression-with-sum-help/m-p/403275#M490921</guid>
      <dc:creator />
      <dc:date>2012-10-11T10:16:10Z</dc:date>
    </item>
  </channel>
</rss>

