<?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: SUM TOTAL by expression values in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/SUM-TOTAL-by-expression-values/m-p/243#M46</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;If(Match(Customer,'A','B','C'), Sum(TOTAL &amp;lt;Currency&amp;gt; {&amp;lt;Customer = {'A', 'B', 'C'}&amp;gt;}Amount))&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 12 Jan 2018 15:11:09 GMT</pubDate>
    <dc:creator>Anil_Babu_Samineni</dc:creator>
    <dc:date>2018-01-12T15:11:09Z</dc:date>
    <item>
      <title>SUM TOTAL by expression values</title>
      <link>https://community.qlik.com/t5/QlikView/SUM-TOTAL-by-expression-values/m-p/241#M44</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is it possible to sum up values by the output of another expression using the TOTAL qualifier? Example:&lt;/P&gt;&lt;P&gt;&lt;IMG class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/189932_pastedImage_1.png" style="max-height: 900px; max-width: 1200px;" /&gt;&lt;/P&gt;&lt;P&gt;Column C is an calculated expression based on column B. I would like to aggregate the amount (column D) by the output of column C. The desired output is displayed in column E. In Qlikview, I am trying to achieve this result using the function TOTAL:&lt;/P&gt;&lt;P&gt;&lt;IMG class="jive-image image-2" src="https://community.qlik.com/legacyfs/online/189933_pastedImage_2.png" style="max-height: 900px; max-width: 1200px;" /&gt;&lt;/P&gt;&lt;P&gt;However, I receive the following error: "Total specifier must be a valid field name" .&lt;/P&gt;&lt;P&gt;&lt;IMG class="jive-image image-3" src="https://community.qlik.com/legacyfs/online/189934_pastedImage_3.png" style="max-height: 900px; max-width: 1200px;" /&gt;&lt;/P&gt;&lt;P&gt;Is there another way to solve this problem? Please find attached the qvw containing the example.&lt;/P&gt;&lt;P&gt;Please also note that this is an simplified example and in reality the currency calculation is very complex containing several IF-statements so it is not possible to use the whole calculation within the total function (total&amp;lt;original expression&amp;gt;).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks,&lt;/P&gt;&lt;P&gt;Paul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Jan 2018 15:06:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SUM-TOTAL-by-expression-values/m-p/241#M44</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-01-12T15:06:16Z</dc:date>
    </item>
    <item>
      <title>Re: SUM TOTAL by expression values</title>
      <link>https://community.qlik.com/t5/QlikView/SUM-TOTAL-by-expression-values/m-p/242#M45</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;If(Match(Customer,'A','B','C'), Sum(TOTAL &amp;lt;Currency&amp;gt; {&amp;lt;Customer = {'A', 'B', 'C'}&amp;gt;}Amount))&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Jan 2018 15:09:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SUM-TOTAL-by-expression-values/m-p/242#M45</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-01-12T15:09:42Z</dc:date>
    </item>
    <item>
      <title>Re: SUM TOTAL by expression values</title>
      <link>https://community.qlik.com/t5/QlikView/SUM-TOTAL-by-expression-values/m-p/243#M46</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;If(Match(Customer,'A','B','C'), Sum(TOTAL &amp;lt;Currency&amp;gt; {&amp;lt;Customer = {'A', 'B', 'C'}&amp;gt;}Amount))&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Jan 2018 15:11:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SUM-TOTAL-by-expression-values/m-p/243#M46</guid>
      <dc:creator>Anil_Babu_Samineni</dc:creator>
      <dc:date>2018-01-12T15:11:09Z</dc:date>
    </item>
    <item>
      <title>Re: SUM TOTAL by expression values</title>
      <link>https://community.qlik.com/t5/QlikView/SUM-TOTAL-by-expression-values/m-p/244#M47</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My currency calculation is more complex, so I have updated the example. Outcome should be as follows (green column):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/190084_pastedImage_1.png" style="max-height: 900px; max-width: 1200px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Jan 2018 10:43:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SUM-TOTAL-by-expression-values/m-p/244#M47</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-01-15T10:43:00Z</dc:date>
    </item>
    <item>
      <title>Re: SUM TOTAL by expression values</title>
      <link>https://community.qlik.com/t5/QlikView/SUM-TOTAL-by-expression-values/m-p/245#M48</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Paul,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First, I would assume that TOTAL qualified (like set analysis) is not evaluated on row level, but on chart level, so I guess you're not able to make it dynamic using conditions. Second, it expects field name as a input. Your variable returns currency code (which is not a field name). I remember trying to use table column in TOTAL without success and I rewrote the expression using creating separate Sum(TOTAL) for each scenario, summing them up by RangeSum() (I might have used Aggr() as well, don't rememnber, it was some time ago).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, my recomendation is to calculate an extra field in script, which would contain proper currency for this aggregation, and you don't need to do this kind of gymnastics.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;Juraj&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Jan 2018 11:48:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SUM-TOTAL-by-expression-values/m-p/245#M48</guid>
      <dc:creator>juraj_misina</dc:creator>
      <dc:date>2018-01-15T11:48:24Z</dc:date>
    </item>
    <item>
      <title>Re: SUM TOTAL by expression values</title>
      <link>https://community.qlik.com/t5/QlikView/SUM-TOTAL-by-expression-values/m-p/246#M49</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I agree with &lt;A href="https://community.qlik.com/people/juraj.misina"&gt;juraj.misina&lt;/A&gt;‌, if this is something you can do in the script (creating currency_cal in the script), then you will save yourself from a very complicated expression (not even sure this is possible to do yet).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Jan 2018 11:56:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SUM-TOTAL-by-expression-values/m-p/246#M49</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-01-15T11:56:03Z</dc:date>
    </item>
    <item>
      <title>Re: SUM TOTAL by expression values</title>
      <link>https://community.qlik.com/t5/QlikView/SUM-TOTAL-by-expression-values/m-p/247#M50</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Juray,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks for your input - I have been afraid it's to complicated for an expression. However, it's a little odd that it's not possible to use calculated values for aggregation, since the result is available on row level.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Paul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Jan 2018 14:23:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SUM-TOTAL-by-expression-values/m-p/247#M50</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-01-15T14:23:53Z</dc:date>
    </item>
    <item>
      <title>Re: SUM TOTAL by expression values</title>
      <link>https://community.qlik.com/t5/QlikView/SUM-TOTAL-by-expression-values/m-p/1637003#M446867</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have a chart with customers and I want to know the distinct number of customers they have gross amount.&lt;/P&gt;&lt;P&gt;For the selected applicable_date I tried following formula&lt;/P&gt;&lt;P&gt;Sum(TOTAL&amp;lt;customer&amp;gt;&lt;BR /&gt;{&amp;lt;&lt;BR /&gt;APPLICABLE_DATE -={"'-'"},&lt;BR /&gt;NUM_APPLICABLE_DATE = {'&amp;gt;=$(=Floor(Num(Account_Date_From)))&amp;lt;=$(=Floor(Num(Account_Date_To)))'}&lt;BR /&gt;&amp;gt;}&lt;BR /&gt;GROSS_AMOUNT)&lt;/P&gt;&lt;P&gt;Please note that Account_Date_From and Account_Date_To are the variables&lt;/P&gt;&lt;P&gt;Anyway, here is the chart&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="clipboard_image_1.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/21856i3D800FCB3115A299/image-size/medium?v=v2&amp;amp;px=400" role="button" title="clipboard_image_1.png" alt="clipboard_image_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Here's an example of one of customer data. according to this Gross Amount is 270.&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Customer Name&lt;/TD&gt;&lt;TD&gt;Application Date&lt;/TD&gt;&lt;TD&gt;Gross Amount&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;NEWFUNDABC&lt;/TD&gt;&lt;TD&gt;27/02/2032&lt;/TD&gt;&lt;TD&gt;50&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;NEWFUNDABC&lt;/TD&gt;&lt;TD&gt;27/02/2032&lt;/TD&gt;&lt;TD&gt;20&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;NEWFUNDABC&lt;/TD&gt;&lt;TD&gt;27/02/2032&lt;/TD&gt;&lt;TD&gt;40&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;NEWFUNDABC&lt;/TD&gt;&lt;TD&gt;27/02/2032&lt;/TD&gt;&lt;TD&gt;30&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;NEWFUNDABC&lt;/TD&gt;&lt;TD&gt;04/03/2032&lt;/TD&gt;&lt;TD&gt;20&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;NEWFUNDABC&lt;/TD&gt;&lt;TD&gt;04/03/2032&lt;/TD&gt;&lt;TD&gt;100&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;NEWFUNDABC&lt;/TD&gt;&lt;TD&gt;04/03/2032&lt;/TD&gt;&lt;TD&gt;10&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance for your help.&lt;/P&gt;</description>
      <pubDate>Fri, 18 Oct 2019 07:20:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SUM-TOTAL-by-expression-values/m-p/1637003#M446867</guid>
      <dc:creator>somacdc</dc:creator>
      <dc:date>2019-10-18T07:20:37Z</dc:date>
    </item>
  </channel>
</rss>

