<?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: set analysis for formula like sum(a-b) in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/set-analysis-for-formula-like-sum-a-b/m-p/382254#M571120</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I thought you said its the same.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ok, use Only({$...} a) - Only({$...} b)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 30 Aug 2012 09:03:09 GMT</pubDate>
    <dc:creator>whiteline</dc:creator>
    <dc:date>2012-08-30T09:03:09Z</dc:date>
    <item>
      <title>set analysis for formula like sum(a-b)</title>
      <link>https://community.qlik.com/t5/QlikView/set-analysis-for-formula-like-sum-a-b/m-p/382251#M571117</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'm trying to create an expression with SET.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is easy to do this... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum ( {$&amp;lt;....&amp;gt;} a) - sum ( {$&amp;lt;....&amp;gt;}&amp;nbsp; b)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BUT... how do i do it when i want it to be SUM (a - b), applying the same set analyis for both a and b?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Aug 2012 08:19:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/set-analysis-for-formula-like-sum-a-b/m-p/382251#M571117</guid>
      <dc:creator />
      <dc:date>2012-08-30T08:19:39Z</dc:date>
    </item>
    <item>
      <title>Re: set analysis for formula like sum(a-b)</title>
      <link>https://community.qlik.com/t5/QlikView/set-analysis-for-formula-like-sum-a-b/m-p/382252#M571118</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;sum ( {$&amp;lt;....&amp;gt;} a-b)&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;sum ( {$&amp;lt;....&amp;gt;} RangeSum(a, -b)) &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Aug 2012 08:26:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/set-analysis-for-formula-like-sum-a-b/m-p/382252#M571118</guid>
      <dc:creator>whiteline</dc:creator>
      <dc:date>2012-08-30T08:26:41Z</dc:date>
    </item>
    <item>
      <title>Re: set analysis for formula like sum(a-b)</title>
      <link>https://community.qlik.com/t5/QlikView/set-analysis-for-formula-like-sum-a-b/m-p/382253#M571119</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i can't do that. because the SET criteria for a and b are different.... &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Aug 2012 08:32:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/set-analysis-for-formula-like-sum-a-b/m-p/382253#M571119</guid>
      <dc:creator />
      <dc:date>2012-08-30T08:32:32Z</dc:date>
    </item>
    <item>
      <title>Re: set analysis for formula like sum(a-b)</title>
      <link>https://community.qlik.com/t5/QlikView/set-analysis-for-formula-like-sum-a-b/m-p/382254#M571120</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I thought you said its the same.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ok, use Only({$...} a) - Only({$...} b)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Aug 2012 09:03:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/set-analysis-for-formula-like-sum-a-b/m-p/382254#M571120</guid>
      <dc:creator>whiteline</dc:creator>
      <dc:date>2012-08-30T09:03:09Z</dc:date>
    </item>
    <item>
      <title>Re: set analysis for formula like sum(a-b)</title>
      <link>https://community.qlik.com/t5/QlikView/set-analysis-for-formula-like-sum-a-b/m-p/382255#M571121</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;yes.. my bad.. typed too quick..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so, perfect, it works... &lt;/P&gt;&lt;P&gt;now, as i'm doing this in pivot table...&lt;/P&gt;&lt;P&gt;the subtotal wont work anymore.. it disappear... &lt;/P&gt;&lt;P&gt;any tips?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Aug 2012 09:17:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/set-analysis-for-formula-like-sum-a-b/m-p/382255#M571121</guid>
      <dc:creator />
      <dc:date>2012-08-30T09:17:09Z</dc:date>
    </item>
    <item>
      <title>Re: set analysis for formula like sum(a-b)</title>
      <link>https://community.qlik.com/t5/QlikView/set-analysis-for-formula-like-sum-a-b/m-p/382256#M571123</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;and also.. how does ONLY() works?&lt;/P&gt;&lt;P&gt;i tried to look up in the document, it's not very helpful...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the reason why the total is not working.. because...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;instead of doin sum (only(a) - only(b)),&lt;/P&gt;&lt;P&gt;i remove the sum, otherwise the figures wont show...&lt;/P&gt;&lt;P&gt;thats why i asked how does only() works...&lt;/P&gt;&lt;P&gt;it's weird... &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Aug 2012 09:21:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/set-analysis-for-formula-like-sum-a-b/m-p/382256#M571123</guid>
      <dc:creator />
      <dc:date>2012-08-30T09:21:02Z</dc:date>
    </item>
    <item>
      <title>Re: set analysis for formula like sum(a-b)</title>
      <link>https://community.qlik.com/t5/QlikView/set-analysis-for-formula-like-sum-a-b/m-p/382257#M571125</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;All answers depends on your data structure. You can reduce your file and post it or try to give more info.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;About Only():&lt;/P&gt;&lt;P&gt;Originally this function checks if your field values are all the same and return this value or null.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But when you &lt;STRONG&gt;know&lt;/STRONG&gt; that there is only &lt;STRONG&gt;one&lt;/STRONG&gt; value (for your case it was my suggesstion 'cause&amp;nbsp; you use &lt;A&gt; and &lt;B&gt; without aggregation) you can use it to modify the set (of dimension values) of such fields.&lt;/B&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;upd:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Oh, I've just realised.&lt;/P&gt;&lt;P&gt;I think when you do sum (only(a) - only(b)),&amp;nbsp; you forget about sum() sets. You have to wrtite a set expression so that the totals can be calculated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Aug 2012 09:29:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/set-analysis-for-formula-like-sum-a-b/m-p/382257#M571125</guid>
      <dc:creator>whiteline</dc:creator>
      <dc:date>2012-08-30T09:29:30Z</dc:date>
    </item>
    <item>
      <title>Re: set analysis for formula like sum(a-b)</title>
      <link>https://community.qlik.com/t5/QlikView/set-analysis-for-formula-like-sum-a-b/m-p/382258#M571126</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks.. after looking at the pivot.. it make sense now. &lt;/P&gt;&lt;P&gt;the only() works when i'm at the lowest value of my pivot, which means i have to expand all the rows.&lt;/P&gt;&lt;P&gt;once i collapse the roll, there's no data to it. that's why there's no value to the total line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a workaround? so that when it's collapsed, the overall total will work?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Aug 2012 09:36:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/set-analysis-for-formula-like-sum-a-b/m-p/382258#M571126</guid>
      <dc:creator />
      <dc:date>2012-08-30T09:36:29Z</dc:date>
    </item>
    <item>
      <title>Re: set analysis for formula like sum(a-b)</title>
      <link>https://community.qlik.com/t5/QlikView/set-analysis-for-formula-like-sum-a-b/m-p/382259#M571128</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Actually two workarounds:&lt;/P&gt;&lt;P&gt;1) use aggregation function if possible (like sum and so on)&lt;/P&gt;&lt;P&gt;2) use dimensionality() function to determine the level of expression being calculated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(dimensionality()=1,&amp;nbsp; expression for subtotals, expression for other cells).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Aug 2012 09:57:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/set-analysis-for-formula-like-sum-a-b/m-p/382259#M571128</guid>
      <dc:creator>whiteline</dc:creator>
      <dc:date>2012-08-30T09:57:34Z</dc:date>
    </item>
    <item>
      <title>Re: set analysis for formula like sum(a-b)</title>
      <link>https://community.qlik.com/t5/QlikView/set-analysis-for-formula-like-sum-a-b/m-p/382260#M571129</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 still can't make my expression work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have made a similator in attached.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Bascially the percentage by row for zone and month and the selected product is good.&lt;/P&gt;&lt;P&gt;Just that the total percentage is not wanted.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I made a small table below, in the last column, if we can get the expression working, it will be great.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;somebody ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Sep 2012 13:10:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/set-analysis-for-formula-like-sum-a-b/m-p/382260#M571129</guid>
      <dc:creator />
      <dc:date>2012-09-05T13:10:37Z</dc:date>
    </item>
    <item>
      <title>Re: set analysis for formula like sum(a-b)</title>
      <link>https://community.qlik.com/t5/QlikView/set-analysis-for-formula-like-sum-a-b/m-p/382261#M571130</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It calculates right:&lt;/P&gt;&lt;P&gt;(158.40 - 3.63 ) / 158.40 = 98%&lt;/P&gt;&lt;P&gt;You have to write true expression without 'Total Mode' Tricks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem is that to achive 42.63 you need to apply fabs to every row while in your expressions&lt;/P&gt;&lt;P&gt;fabs(column(3) - Column(1))&lt;/P&gt;&lt;P&gt;it applies to the total values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use&lt;/P&gt;&lt;P&gt;=sum(aggr(fabs(sum(QUANTITY_FORECAST_F2) - sum(QUANTITY_REAL)), ZONE, PRODUCT, SUB ZONE))&lt;/P&gt;&lt;P&gt;it gives the sum of absolute differences for all rows and for each row.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Sep 2012 14:34:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/set-analysis-for-formula-like-sum-a-b/m-p/382261#M571130</guid>
      <dc:creator>whiteline</dc:creator>
      <dc:date>2012-09-05T14:34:11Z</dc:date>
    </item>
  </channel>
</rss>

