<?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: Margin Calculation by Country in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Margin-Calculation-by-Country/m-p/893084#M310970</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Why cant i call "New Group" in set analysis...!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-users/6142"&gt;mwoolf&lt;/A&gt;‌&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 06 Jul 2015 20:39:29 GMT</pubDate>
    <dc:creator />
    <dc:date>2015-07-06T20:39:29Z</dc:date>
    <item>
      <title>Margin Calculation by Country</title>
      <link>https://community.qlik.com/t5/QlikView/Margin-Calculation-by-Country/m-p/893081#M310967</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Friends,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can someone help me to fix this issue...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need individual their own values for each country...Please look below image for clear understanding...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="www.png" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/91993_www.png" style="height: 268px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;venky&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-users/171708"&gt;sunindia&lt;/A&gt;&lt;A href="https://community.qlik.com/qlik-users/144492"&gt;alk&lt;/A&gt;&lt;A href="https://community.qlik.com/qlik-users/3931"&gt;mov&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Jul 2015 18:29:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Margin-Calculation-by-Country/m-p/893081#M310967</guid>
      <dc:creator />
      <dc:date>2015-07-06T18:29:41Z</dc:date>
    </item>
    <item>
      <title>Re: Margin Calculation by Country</title>
      <link>https://community.qlik.com/t5/QlikView/Margin-Calculation-by-Country/m-p/893082#M310968</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your calculations are being done in variables, not in the chart expression; therefore they are not being aggregated by the dimension automatically.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You need to change your vMaxNet and vMaxCost variables (and who knows how many others).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vMaxNet would be somthing like:&lt;/P&gt;&lt;P&gt;aggr(Sum({&amp;lt;Year={$(vMaxYear)}&amp;gt;} UnitPrice * Quantity *(1-Discount)),Country)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when the NewGroup selected field is Country.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can probably replace Country in the expression above with GetCurrentField("New Group")&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Jul 2015 18:40:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Margin-Calculation-by-Country/m-p/893082#M310968</guid>
      <dc:creator>m_woolf</dc:creator>
      <dc:date>2015-07-06T18:40:14Z</dc:date>
    </item>
    <item>
      <title>Re: Margin Calculation by Country</title>
      <link>https://community.qlik.com/t5/QlikView/Margin-Calculation-by-Country/m-p/893083#M310969</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I can see that the variable declaration is wrong. For Example&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vMaxMargin&lt;/P&gt;&lt;P&gt;SUM({&amp;lt;Year = {'$(vMaxYear)'}&amp;gt;}Quantity * UnitPrice * (1-Discount)) - SUM({&amp;lt;Year = {'$(vMaxYear)'}&amp;gt;}Quantity * UnitCost)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vMaxCost&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;SUM({&amp;lt;Year = {'$(vMaxYear)'}&amp;gt;}Quantity * UnitCost)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;vMaxNet&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;SUM({&amp;lt;Year = {'$(vMaxYear)'}&amp;gt;}Quantity * UnitPrice * (1-Discount))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;Similarly use below for previous year.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;SUM({&amp;lt;Year = {'$(vPreYear)'}&amp;gt;}Quantity * UnitPrice * (1-Discount)) - SUM({&amp;lt;Year = {'$(vPreYear)'}&amp;gt;}Quantity * UnitCost)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;I can't go each and every variables, so better to implement above suggested variables first and try to implement other accordingly..&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Jul 2015 19:26:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Margin-Calculation-by-Country/m-p/893083#M310969</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2015-07-06T19:26:52Z</dc:date>
    </item>
    <item>
      <title>Re: Margin Calculation by Country</title>
      <link>https://community.qlik.com/t5/QlikView/Margin-Calculation-by-Country/m-p/893084#M310970</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Why cant i call "New Group" in set analysis...!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-users/6142"&gt;mwoolf&lt;/A&gt;‌&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Jul 2015 20:39:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Margin-Calculation-by-Country/m-p/893084#M310970</guid>
      <dc:creator />
      <dc:date>2015-07-06T20:39:29Z</dc:date>
    </item>
    <item>
      <title>Re: Margin Calculation by Country</title>
      <link>https://community.qlik.com/t5/QlikView/Margin-Calculation-by-Country/m-p/893085#M310971</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi venkat,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You got the same result for &lt;STRONG&gt;Margin&lt;/STRONG&gt; because those variables declares with &lt;STRONG&gt;"="&lt;/STRONG&gt; (equal sign).&lt;/P&gt;&lt;P&gt;Remove it from variable declaration and check attached result.&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;Andrei Kaliahin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Jul 2015 08:28:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Margin-Calculation-by-Country/m-p/893085#M310971</guid>
      <dc:creator>crusader_</dc:creator>
      <dc:date>2015-07-07T08:28:22Z</dc:date>
    </item>
    <item>
      <title>Re: Margin Calculation by Country</title>
      <link>https://community.qlik.com/t5/QlikView/Margin-Calculation-by-Country/m-p/893086#M310972</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="http://www.qlikfix.com/2011/06/08/not-all-variables-are-created-equal/" title="http://www.qlikfix.com/2011/06/08/not-all-variables-are-created-equal/"&gt;Not all variables are created equal - The Qlik Fix! The Qlik Fix!&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Jul 2015 14:48:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Margin-Calculation-by-Country/m-p/893086#M310972</guid>
      <dc:creator>m_woolf</dc:creator>
      <dc:date>2015-07-07T14:48:05Z</dc:date>
    </item>
  </channel>
</rss>

