<?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(Total $(Variablename) in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/sum-Total-Variablename/m-p/247080#M500122</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to use a varialbe in an expression. I am sure the syntax is correct but it does not seem to be working. Very frustrating!!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=$(vTotalCostofQual)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This variable works fine. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=sum($(vTotalCostofQual))/sum(TOTAL($(vTotalCostofQual))) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This does not. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to find the Total Cost of Qual as a % of the overall cost of Qual.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Variable is created in the book not in the script. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;&lt;EM&gt;count({&amp;lt;[Call Category]={'Fault'}&amp;gt;} DISTINCT CallID)*vCallCost+&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;&lt;EM&gt;sum({&amp;lt;[SOP Type]={'Return'}&amp;gt;} [Extended Price])+&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;&lt;EM&gt;count({&amp;lt;[Call Type]={'RTB - F'}&amp;gt;}distinct [CallID])*vRTBCost+&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;&lt;EM&gt;sum({&amp;lt;type = {'Other'}&amp;gt;} quant * [WebPrice.Standard Cost])+&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;&lt;EM&gt;count([New Gpid])*(vUPS+vPick)+&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;&lt;EM&gt;sum({&amp;lt;type = {'Accessory'}&amp;gt;} quant * [WebPrice.Standard Cost])+&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;&lt;EM&gt;sum({&amp;lt;type = {'Accessory'}&amp;gt;} quant * vPick)&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Above is the expresssion that is in the variable, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help would be most appreciated. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Richard&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 27 May 2011 13:07:59 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-05-27T13:07:59Z</dc:date>
    <item>
      <title>sum(Total $(Variablename)</title>
      <link>https://community.qlik.com/t5/QlikView/sum-Total-Variablename/m-p/247080#M500122</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to use a varialbe in an expression. I am sure the syntax is correct but it does not seem to be working. Very frustrating!!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=$(vTotalCostofQual)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This variable works fine. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=sum($(vTotalCostofQual))/sum(TOTAL($(vTotalCostofQual))) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This does not. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to find the Total Cost of Qual as a % of the overall cost of Qual.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Variable is created in the book not in the script. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;&lt;EM&gt;count({&amp;lt;[Call Category]={'Fault'}&amp;gt;} DISTINCT CallID)*vCallCost+&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;&lt;EM&gt;sum({&amp;lt;[SOP Type]={'Return'}&amp;gt;} [Extended Price])+&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;&lt;EM&gt;count({&amp;lt;[Call Type]={'RTB - F'}&amp;gt;}distinct [CallID])*vRTBCost+&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;&lt;EM&gt;sum({&amp;lt;type = {'Other'}&amp;gt;} quant * [WebPrice.Standard Cost])+&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;&lt;EM&gt;count([New Gpid])*(vUPS+vPick)+&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;&lt;EM&gt;sum({&amp;lt;type = {'Accessory'}&amp;gt;} quant * [WebPrice.Standard Cost])+&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;&lt;EM&gt;sum({&amp;lt;type = {'Accessory'}&amp;gt;} quant * vPick)&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Above is the expresssion that is in the variable, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help would be most appreciated. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Richard&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 May 2011 13:07:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/sum-Total-Variablename/m-p/247080#M500122</guid>
      <dc:creator />
      <dc:date>2011-05-27T13:07:59Z</dc:date>
    </item>
    <item>
      <title>sum(Total $(Variablename)</title>
      <link>https://community.qlik.com/t5/QlikView/sum-Total-Variablename/m-p/247081#M500123</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try to use:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum(aggr($(vTotalCostofQual), Dimension) )/sum(TOTAL aggr($(vTotalCostofQual), Dimension)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 May 2011 13:15:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/sum-Total-Variablename/m-p/247081#M500123</guid>
      <dc:creator />
      <dc:date>2011-05-27T13:15:31Z</dc:date>
    </item>
    <item>
      <title>sum(Total $(Variablename)</title>
      <link>https://community.qlik.com/t5/QlikView/sum-Total-Variablename/m-p/247082#M500124</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Still was not working, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I had a thought and created another vaiable which had the TOTAL qualifier in and just divided one by the other. Worked fine. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your help though, you put me onto the right line. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rich&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 May 2011 13:50:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/sum-Total-Variablename/m-p/247082#M500124</guid>
      <dc:creator />
      <dc:date>2011-05-27T13:50:24Z</dc:date>
    </item>
    <item>
      <title>Re: sum(Total $(Variablename)</title>
      <link>https://community.qlik.com/t5/QlikView/sum-Total-Variablename/m-p/247083#M500125</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rich,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm having the same issue that you solved. Can you show the formula or explain how you added the TOTAL qualifier to your variable seeing as it has several calculations? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Jun 2015 20:22:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/sum-Total-Variablename/m-p/247083#M500125</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-06-12T20:22:21Z</dc:date>
    </item>
  </channel>
</rss>

