<?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: Expression Total not calculating in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Expression-Total-not-calculating/m-p/820889#M289377</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I think the problem here is that your columns in the straight table are called exactly as your fields, so when you're doing the calculation in the GP% column, QlikView is taking the name of the fields instead of the columns. Because of this, the expression totals appears as null ( - ), because internally qlikview is taking your formula as "&lt;EM style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;1 - (only([COGS])/ only([Gross Revenue]))".&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;. Try changing the name of the columns in the straight table. You can add a blank space after the last letter so the names will be different and then you can call the column names like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;= 1 - ([COGS ] / [Gross Revenue ])&lt;/STRONG&gt;&lt;/EM&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;STRONG&gt;'&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Also as a tip you can differentiate an object column from a field looking at the color it has when typing the expression (columns are shown in blue, while field names are shown in dark red),&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;regards&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 25 Nov 2014 22:09:15 GMT</pubDate>
    <dc:creator>jaimeaguilar</dc:creator>
    <dc:date>2014-11-25T22:09:15Z</dc:date>
    <item>
      <title>Expression Total not calculating</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-Total-not-calculating/m-p/820888#M289376</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a straight table with 3 columns: Gross Revenue; COGS; and GP%.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Total Mode for the first 2 columns is set to Sum, and is calculating the correct figures. The Total Mode for GP% is set to Expression Total, which is returning '-'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" height="215" style="width: 324px; height: 220px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl65" height="17" style="text-align: center;" width="98"&gt;&lt;STRONG&gt;Gross Revenue&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD class="xl65" style="border-left-style: none; text-align: center;" width="98"&gt;&lt;STRONG&gt;COGS&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD class="xl65" style="border-left-style: none; text-align: center;" width="98"&gt;&lt;STRONG&gt;GP%&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl66" height="17" style="border-top: none;"&gt;$405.00&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;$139.35&lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-top-style: none; border-left-style: none; text-align: center;"&gt;65.59%&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl68" height="17" style="border-top: none;"&gt;$87.27&lt;/TD&gt;&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;$30.96&lt;/TD&gt;&lt;TD align="right" class="xl69" style="border-top-style: none; border-left-style: none; text-align: center;"&gt;64.53%&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl66" height="17" style="border-top: none;"&gt;$3,545.82&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;$1,531.50&lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-top-style: none; border-left-style: none; text-align: center;"&gt;56.81%&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl68" height="17" style="border-top: none;"&gt;$18.00&lt;/TD&gt;&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;$6.27&lt;/TD&gt;&lt;TD align="right" class="xl69" style="border-top-style: none; border-left-style: none; text-align: center;"&gt;65.17%&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl66" height="17" style="border-top: none;"&gt;$13.64&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;$4.70&lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-top-style: none; border-left-style: none; text-align: center;"&gt;65.53%&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl71" height="17" style="border-top: none;"&gt;$659.45&lt;/TD&gt;&lt;TD align="right" class="xl71" style="border-top: none; border-left: none;"&gt;$273.43&lt;/TD&gt;&lt;TD align="right" class="xl72" style="border-top-style: none; border-left-style: none; text-align: center;"&gt;58.54%&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl73" height="17"&gt;&lt;STRONG&gt;$4,729.18&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD align="right" class="xl73" style="border-left: none;"&gt;&lt;STRONG&gt;$1,986.21&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD class="xl70" style="border-left-style: none; text-align: center;"&gt;&lt;STRONG&gt; -&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The GP% expression is '&lt;EM&gt;= 1 - ([COGS] / [Gross Revenue])&lt;/EM&gt;'. I am referencing the label names of the first 2 columns in this formula, could that be the reason it is not calculating? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Nov 2014 21:33:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-Total-not-calculating/m-p/820888#M289376</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-11-25T21:33:15Z</dc:date>
    </item>
    <item>
      <title>Re: Expression Total not calculating</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-Total-not-calculating/m-p/820889#M289377</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I think the problem here is that your columns in the straight table are called exactly as your fields, so when you're doing the calculation in the GP% column, QlikView is taking the name of the fields instead of the columns. Because of this, the expression totals appears as null ( - ), because internally qlikview is taking your formula as "&lt;EM style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;1 - (only([COGS])/ only([Gross Revenue]))".&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;. Try changing the name of the columns in the straight table. You can add a blank space after the last letter so the names will be different and then you can call the column names like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;= 1 - ([COGS ] / [Gross Revenue ])&lt;/STRONG&gt;&lt;/EM&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;STRONG&gt;'&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Also as a tip you can differentiate an object column from a field looking at the color it has when typing the expression (columns are shown in blue, while field names are shown in dark red),&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;regards&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Nov 2014 22:09:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-Total-not-calculating/m-p/820889#M289377</guid>
      <dc:creator>jaimeaguilar</dc:creator>
      <dc:date>2014-11-25T22:09:15Z</dc:date>
    </item>
    <item>
      <title>Re: Expression Total not calculating</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-Total-not-calculating/m-p/820890#M289378</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Jaime, thank you for your response. Unfortunately this is not the problem, as I do not have fields for COGS and Gross Revenue, they are calculated from the fields CostPerUnit * Qty and PricePerUnit * Qty. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried moving all my formulas into variables but this results in the same problem. My next step will be to edit the script to create the fields COGS and Gross Revenue, calculating them during the load.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Nov 2014 22:20:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-Total-not-calculating/m-p/820890#M289378</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-11-25T22:20:02Z</dc:date>
    </item>
    <item>
      <title>Re: Expression Total not calculating</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-Total-not-calculating/m-p/820891#M289379</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have found by calculating COGS and Gross Revenue in the load script, rather than in the straight table, the GP% total calculates.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Nov 2014 00:27:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-Total-not-calculating/m-p/820891#M289379</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-11-26T00:27:25Z</dc:date>
    </item>
  </channel>
</rss>

