<?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: Aggregated table and Straight table with Set Analysis Subtraction Formula's Totals don't match? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Aggregated-table-and-Straight-table-with-Set-Analysis/m-p/1165401#M379460</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;Can you attach sample data to understand the issue in detail.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kaushik Solanki&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 08 Sep 2016 08:21:51 GMT</pubDate>
    <dc:creator>kaushiknsolanki</dc:creator>
    <dc:date>2016-09-08T08:21:51Z</dc:date>
    <item>
      <title>Aggregated table and Straight table with Set Analysis Subtraction Formula's Totals don't match?</title>
      <link>https://community.qlik.com/t5/QlikView/Aggregated-table-and-Straight-table-with-Set-Analysis/m-p/1165400#M379459</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Guys,&lt;/P&gt;&lt;P&gt;I have been trying to work out why I cannot get two totals to match&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I have two tables:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1)&lt;/P&gt;&lt;P&gt;A straight table with a check Column (expression) which gives correct results for subtracting across columns.&lt;/P&gt;&lt;P&gt;"Notice I am not using any aggregation e.g.: sum , count in expression but this is gives correct results"!&lt;/P&gt;&lt;P&gt;=if((Column(2)-Column(4)-Column(5)-Column(6))&amp;lt;0,0,(Column(2)-Column(4)-Column(5)-Column(6)))&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;so the straight table columns are pointing to each columns expression as below &lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;(Column(2) = &lt;/SPAN&gt;SL_ON_HAND_QTY -&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Column(4) =&amp;nbsp; &lt;/SPAN&gt;sum({$&amp;lt;TRANS_TYPE={'DRINV','DRCDT'}&amp;gt;}ENTERED_QTY) -&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Column(5)=&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;sum({$&amp;lt;TRANS_TYPE={'BMTRF'}&amp;gt;}ENTERED_QTY) -&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Column(6) =&amp;nbsp; &lt;SPAN style="font-size: 13.3333px;"&gt;sum({$&amp;lt;TRANS_TYPE={'STTRF'},STOCK_LOCATION={'TTT','CCC'}&amp;gt;}ENTERED_QTY)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;and another column with =&lt;SPAN style="font-size: 13.3333px;"&gt;$(vSlowQty) the problem variable.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2)&lt;/P&gt;&lt;P&gt;Now I&amp;nbsp; have another table an aggregated summary table which is using same variable in expression&lt;/P&gt;&lt;P&gt;=Sum(Aggr($(vSlowQty),STOCK_CATEGORY,STOCK_LOCATION,STOCK_CODE)&lt;/P&gt;&lt;P&gt;as we still need to be able to select on&amp;nbsp; 3 Dimensions which the above formula does&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have used the variable &lt;SPAN style="font-size: 13.3333px;"&gt;$(vSlowQty) in both tables which is subtracting the Columns as above &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;so&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;$(vSlowQty)&amp;nbsp; =&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;if(SL_ON_HAND_QTY-&lt;/P&gt;&lt;P&gt;sum({$&amp;lt;TRANS_TYPE={'DRINV','DRCDT'}&amp;gt;}ENTERED_QTY) -&lt;/P&gt;&lt;P&gt;sum({$&amp;lt;TRANS_TYPE={'BMTRF'}&amp;gt;}ENTERED_QTY) -&lt;/P&gt;&lt;P&gt;sum({$&amp;lt;TRANS_TYPE={'STTRF'},STOCK_LOCATION={'TTT','CCC'}&amp;gt;}ENTERED_QTY)&amp;lt;0,0,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SL_ON_HAND_QTY-sum({$&amp;lt;TRANS_TYPE={'DRINV','DRCDT'}&amp;gt;}ENTERED_QTY) -&lt;/P&gt;&lt;P&gt;sum({$&amp;lt;TRANS_TYPE={'BMTRF'}&amp;gt;}ENTERED_QTY) -&lt;/P&gt;&lt;P&gt;sum({$&amp;lt;TRANS_TYPE={'STTRF'},STOCK_LOCATION={'TTT','CCC'}&amp;gt;}ENTERED_QTY))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried using count instead of Sum its gets total closer but still no match what am I missing here ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;any help appreciated&lt;/P&gt;&lt;P&gt;regards Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Sep 2016 08:17:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggregated-table-and-Straight-table-with-Set-Analysis/m-p/1165400#M379459</guid>
      <dc:creator>Peter_Brunner</dc:creator>
      <dc:date>2016-09-08T08:17:15Z</dc:date>
    </item>
    <item>
      <title>Re: Aggregated table and Straight table with Set Analysis Subtraction Formula's Totals don't match?</title>
      <link>https://community.qlik.com/t5/QlikView/Aggregated-table-and-Straight-table-with-Set-Analysis/m-p/1165401#M379460</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;Can you attach sample data to understand the issue in detail.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kaushik Solanki&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Sep 2016 08:21:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggregated-table-and-Straight-table-with-Set-Analysis/m-p/1165401#M379460</guid>
      <dc:creator>kaushiknsolanki</dc:creator>
      <dc:date>2016-09-08T08:21:51Z</dc:date>
    </item>
    <item>
      <title>Re: Aggregated table and Straight table with Set Analysis Subtraction Formula's Totals don't match?</title>
      <link>https://community.qlik.com/t5/QlikView/Aggregated-table-and-Straight-table-with-Set-Analysis/m-p/1165402#M379461</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your first expression isn't using Sum(Aggr(...)) function, but still giving you the right total, why use it for the second expression? May be try just &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px;"&gt;&lt;STRONG&gt;vSlowQty&lt;/STRONG&gt; or &lt;STRONG&gt;$(&lt;/STRONG&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px;"&gt;&lt;STRONG&gt;vSlowQty)&lt;/STRONG&gt; as your expression.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Sep 2016 09:30:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggregated-table-and-Straight-table-with-Set-Analysis/m-p/1165402#M379461</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-09-08T09:30:26Z</dc:date>
    </item>
    <item>
      <title>Re: Aggregated table and Straight table with Set Analysis Subtraction Formula's Totals don't match?</title>
      <link>https://community.qlik.com/t5/QlikView/Aggregated-table-and-Straight-table-with-Set-Analysis/m-p/1165403#M379462</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Guys,&lt;/P&gt;&lt;P&gt;I have attached a sample I put together it has more explanation in app &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sunny I need a variable to reflect the results the way the simple formula below works in main table&lt;/P&gt;&lt;P&gt;if((Column(2)-Column(4)-Column(5)-Column(6))&amp;lt;0,0,(Column(2)-Column(4)-Column(5)-Column(6)))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;maybe I should not use set analysis with subtractions ?&amp;nbsp; but I need to use this in a Variable so I can use this in 2 different tables one of which uses Aggr &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Sep 2016 07:17:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggregated-table-and-Straight-table-with-Set-Analysis/m-p/1165403#M379462</guid>
      <dc:creator>Peter_Brunner</dc:creator>
      <dc:date>2016-09-09T07:17:27Z</dc:date>
    </item>
    <item>
      <title>Re: Aggregated table and Straight table with Set Analysis Subtraction Formula's Totals don't match?</title>
      <link>https://community.qlik.com/t5/QlikView/Aggregated-table-and-Straight-table-with-Set-Analysis/m-p/1165404#M379463</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check with this as your variable:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;If(&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;SL_ON_HAND_QTY-&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;$(vSalesQty)-&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sum({$&amp;lt;TRANS_TYPE={'STTRF'},STOCK_LOCATION={'KWH','C33'}&amp;gt;}ENTERED_QTY)-&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sum({$&amp;lt;TRANS_TYPE={'BMTRF'}&amp;gt;}ENTERED_QTY)&amp;lt;0,0,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;SL_ON_HAND_QTY-&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;$(vSalesQty)-&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sum({$&amp;lt;TRANS_TYPE={'STTRF'},STOCK_LOCATION={'KWH','C33'}&amp;gt;}ENTERED_QTY)-&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sum({$&amp;lt;TRANS_TYPE={'BMTRF'}&amp;gt;}ENTERED_QTY))&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Sep 2016 07:32:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggregated-table-and-Straight-table-with-Set-Analysis/m-p/1165404#M379463</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-09-09T07:32:34Z</dc:date>
    </item>
    <item>
      <title>Re: Aggregated table and Straight table with Set Analysis Subtraction Formula's Totals don't match?</title>
      <link>https://community.qlik.com/t5/QlikView/Aggregated-table-and-Straight-table-with-Set-Analysis/m-p/1165405#M379464</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sunny,&lt;/P&gt;&lt;P&gt;wow that was quick! and Thanks&lt;/P&gt;&lt;P&gt;now explain why this works the way you did this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Sep 2016 07:40:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggregated-table-and-Straight-table-with-Set-Analysis/m-p/1165405#M379464</guid>
      <dc:creator>Peter_Brunner</dc:creator>
      <dc:date>2016-09-09T07:40:01Z</dc:date>
    </item>
    <item>
      <title>Re: Aggregated table and Straight table with Set Analysis Subtraction Formula's Totals don't match?</title>
      <link>https://community.qlik.com/t5/QlikView/Aggregated-table-and-Straight-table-with-Set-Analysis/m-p/1165406#M379465</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think your Column(2) was having an if statement, whereas your variable did not include the if statement within your variable when you were checking if the Col(2) - Col(4) - Col(5) - Col(6) &amp;gt; 0. Once I fixed Col(4) to match what you had in Col(4), the expression started working.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Sep 2016 07:42:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggregated-table-and-Straight-table-with-Set-Analysis/m-p/1165406#M379465</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-09-09T07:42:56Z</dc:date>
    </item>
    <item>
      <title>Re: Aggregated table and Straight table with Set Analysis Subtraction Formula's Totals don't match?</title>
      <link>https://community.qlik.com/t5/QlikView/Aggregated-table-and-Straight-table-with-Set-Analysis/m-p/1165407#M379466</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sunny,&lt;/P&gt;&lt;P&gt;I had a good look at what I did and you are right &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/blush.png" /&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks again &lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Sep 2016 00:12:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggregated-table-and-Straight-table-with-Set-Analysis/m-p/1165407#M379466</guid>
      <dc:creator>Peter_Brunner</dc:creator>
      <dc:date>2016-09-12T00:12:38Z</dc:date>
    </item>
    <item>
      <title>Re: Aggregated table and Straight table with Set Analysis Subtraction Formula's Totals don't match?</title>
      <link>https://community.qlik.com/t5/QlikView/Aggregated-table-and-Straight-table-with-Set-Analysis/m-p/1165408#M379467</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am glad you were able to grasp the issue that was causing problem here &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Sunny&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Sep 2016 00:21:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggregated-table-and-Straight-table-with-Set-Analysis/m-p/1165408#M379467</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-09-12T00:21:53Z</dc:date>
    </item>
  </channel>
</rss>

