<?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 sum(if) problem in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/sum-if-problem/m-p/330581#M492410</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I created a qlikview with a pivot table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;dimension 1&amp;nbsp; dimension 2&amp;nbsp;&amp;nbsp; sales(with set analysis selections)&amp;nbsp; bonus 7.5% of sales&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sales = a calculated expression where i with set analysis only the sales take of the last 6 month.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the bonus expression i try this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(demension 2 &amp;lt;&amp;gt; 'value',[sales] * 0.075,0)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This works great. However it calculates on totals with the by the if statement excluded ( &amp;lt;&amp;gt; 'value') included.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Something like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;dimension 1&amp;nbsp; aa&amp;nbsp;&amp;nbsp; € 100.00&amp;nbsp; 7.5&lt;/P&gt;&lt;P&gt;dimension 2&amp;nbsp; bb&amp;nbsp;&amp;nbsp; € 200.00&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&amp;nbsp;&amp;nbsp;&amp;nbsp; excluded with if statement&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Total&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; € 300.00 22.50 (instead of 7.5)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried to put a sum around [sales]*0.075 but get an error on it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help me to get the correct total.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 03 Jul 2012 07:00:36 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-07-03T07:00:36Z</dc:date>
    <item>
      <title>sum(if) problem</title>
      <link>https://community.qlik.com/t5/QlikView/sum-if-problem/m-p/330581#M492410</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I created a qlikview with a pivot table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;dimension 1&amp;nbsp; dimension 2&amp;nbsp;&amp;nbsp; sales(with set analysis selections)&amp;nbsp; bonus 7.5% of sales&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sales = a calculated expression where i with set analysis only the sales take of the last 6 month.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the bonus expression i try this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(demension 2 &amp;lt;&amp;gt; 'value',[sales] * 0.075,0)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This works great. However it calculates on totals with the by the if statement excluded ( &amp;lt;&amp;gt; 'value') included.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Something like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;dimension 1&amp;nbsp; aa&amp;nbsp;&amp;nbsp; € 100.00&amp;nbsp; 7.5&lt;/P&gt;&lt;P&gt;dimension 2&amp;nbsp; bb&amp;nbsp;&amp;nbsp; € 200.00&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&amp;nbsp;&amp;nbsp;&amp;nbsp; excluded with if statement&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Total&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; € 300.00 22.50 (instead of 7.5)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried to put a sum around [sales]*0.075 but get an error on it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help me to get the correct total.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Jul 2012 07:00:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/sum-if-problem/m-p/330581#M492410</guid>
      <dc:creator />
      <dc:date>2012-07-03T07:00:36Z</dc:date>
    </item>
    <item>
      <title>Re: sum(if) problem</title>
      <link>https://community.qlik.com/t5/QlikView/sum-if-problem/m-p/330582#M492411</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This could be solved in straight table with the total mode (in expression tab) as sum of rows. In pivot table probably we need do the following for bonus.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=0.075*Sum({&amp;lt;dimension2-={'value'}&amp;gt;} Sales) and other set analysis parameters used in sales.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kiran Rokkam.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Jul 2012 07:11:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/sum-if-problem/m-p/330582#M492411</guid>
      <dc:creator />
      <dc:date>2012-07-03T07:11:01Z</dc:date>
    </item>
    <item>
      <title>Re: sum(if) problem</title>
      <link>https://community.qlik.com/t5/QlikView/sum-if-problem/m-p/330583#M492412</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Today i learned the solution. Many thanks for all your advice.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i put the *0.075 into the set analysis used by sales. and append an -= selection&lt;/P&gt;&lt;P&gt;sum&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;({$&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Jaar&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={'$(Rapportjaar)'},&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Maand&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={'&amp;lt;=$(Rapportmaand)'}, &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;KeyGrootboek&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; -= {'220'}&amp;gt;} VABTTB * 0.075)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;So simple and i missed it completely.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Many thanks.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Jul 2012 07:45:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/sum-if-problem/m-p/330583#M492412</guid>
      <dc:creator />
      <dc:date>2012-07-03T07:45:22Z</dc:date>
    </item>
  </channel>
</rss>

