<?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 reference the total in a column in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/reference-the-total-in-a-column/m-p/240427#M90958</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You could try:&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;Sum(TOTAL [Bus Sales] + [Res Sales])&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Is there an aggregation in Bus Sales and Res Sales?&lt;/P&gt;&lt;P&gt;You don't have to go all the way back and replicate the entire logic structure. Find the first agregation going back from Sales and then use that with TOTAL to get back to your Sales.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 03 Aug 2010 20:16:16 GMT</pubDate>
    <dc:creator />
    <dc:date>2010-08-03T20:16:16Z</dc:date>
    <item>
      <title>reference the total in a column</title>
      <link>https://community.qlik.com/t5/QlikView/reference-the-total-in-a-column/m-p/240424#M90955</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am working with a straight table which contains a couple of dimensions and a few simple expressions. I would lile to use the total of one column ( [Sales] ) in another calculation, but doing&lt;/P&gt;&lt;P&gt;sum( TOTAL [Sales]) doesn't work&lt;/P&gt;&lt;P&gt;The [Sales] expression is a calculated field itself, not a field loaded in script.&lt;/P&gt;&lt;P&gt;Any ideas why that doesn't work?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Aug 2010 19:38:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/reference-the-total-in-a-column/m-p/240424#M90955</guid>
      <dc:creator />
      <dc:date>2010-08-02T19:38:54Z</dc:date>
    </item>
    <item>
      <title>reference the total in a column</title>
      <link>https://community.qlik.com/t5/QlikView/reference-the-total-in-a-column/m-p/240425#M90956</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You said Sales was not a field from the script, but the way you are using it assumes that it is.&lt;/P&gt;&lt;P&gt;Instead take whatever expression you are using for Sales and use that with the TOTAL parameter. We would need to see your Sales expression to give more specific information.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Aug 2010 20:32:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/reference-the-total-in-a-column/m-p/240425#M90956</guid>
      <dc:creator />
      <dc:date>2010-08-02T20:32:16Z</dc:date>
    </item>
    <item>
      <title>reference the total in a column</title>
      <link>https://community.qlik.com/t5/QlikView/reference-the-total-in-a-column/m-p/240426#M90957</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That's exactly what I also thought of doing, but the Sales calculation is build from other calculations that were also built upon...so I don't want to replicate the whole logic again. Some of them contain If Else statements etc.&lt;/P&gt;&lt;P&gt;ex:&lt;/P&gt;&lt;P&gt;[Sales] is [Bus Sales] + [Res Sales]&lt;/P&gt;&lt;P&gt;I created [Bus Sales] by adding 2 other columns: [ B Acc Value] + [B Act Value]&lt;/P&gt;&lt;P&gt;[B Acc Value] is created by doing If ( [B Type Value] ='record', 0, 1)&lt;/P&gt;&lt;P&gt;etc..&lt;/P&gt;&lt;P&gt;Any thoughts?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Aug 2010 20:51:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/reference-the-total-in-a-column/m-p/240426#M90957</guid>
      <dc:creator />
      <dc:date>2010-08-02T20:51:55Z</dc:date>
    </item>
    <item>
      <title>reference the total in a column</title>
      <link>https://community.qlik.com/t5/QlikView/reference-the-total-in-a-column/m-p/240427#M90958</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You could try:&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;Sum(TOTAL [Bus Sales] + [Res Sales])&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Is there an aggregation in Bus Sales and Res Sales?&lt;/P&gt;&lt;P&gt;You don't have to go all the way back and replicate the entire logic structure. Find the first agregation going back from Sales and then use that with TOTAL to get back to your Sales.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Aug 2010 20:16:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/reference-the-total-in-a-column/m-p/240427#M90958</guid>
      <dc:creator />
      <dc:date>2010-08-03T20:16:16Z</dc:date>
    </item>
    <item>
      <title>reference the total in a column</title>
      <link>https://community.qlik.com/t5/QlikView/reference-the-total-in-a-column/m-p/240428#M90959</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am having the same issue. I tried the suggestion of adding total, but I am receiving a null value. Any other suggestions?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Mar 2011 18:43:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/reference-the-total-in-a-column/m-p/240428#M90959</guid>
      <dc:creator />
      <dc:date>2011-03-16T18:43:56Z</dc:date>
    </item>
    <item>
      <title>reference the total in a column</title>
      <link>https://community.qlik.com/t5/QlikView/reference-the-total-in-a-column/m-p/240429#M90960</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Kristy and Maria,&lt;/P&gt;&lt;P&gt;TOTAL will only work inside an aggregation function that's applied to a field or a calculation based on fields (but not variables that contain other functions inside).&lt;/P&gt;&lt;P&gt;If you have more than one field that you need to summarize, I recommend using function RANGESUM(), to avoid problems with nulls. For example:&lt;/P&gt;&lt;P&gt;If you have a formula like this:&lt;/P&gt;&lt;P&gt;sum(Revenue1 + Revenue2)&lt;/P&gt;&lt;P&gt;If one of the two numbers can be null() or missing, the sum will also be equal to null(). So, if Revenue2=null(), then:&lt;/P&gt;&lt;P&gt;Revenue1+Revenue2 = null()&lt;/P&gt;&lt;P&gt;, however:&lt;/P&gt;&lt;P&gt;RANGESUM(Revenue1, Revenue2) = Revenue1, because function RANGESUM() is replacing nulls() with zeros.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, back to your original question about total, - the following formula, as an example, should work:&lt;/P&gt;&lt;P&gt;sum(TOTAL RANGESUM(Revenue1, Revenue2))&lt;/P&gt;&lt;P&gt;cheers,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Mar 2011 21:40:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/reference-the-total-in-a-column/m-p/240429#M90960</guid>
      <dc:creator>Oleg_Troyansky</dc:creator>
      <dc:date>2011-03-16T21:40:17Z</dc:date>
    </item>
  </channel>
</rss>

