<?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 Formula in a field in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Formula-in-a-field/m-p/227059#M79197</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It's not possible to do. It is breaking some chart concepts. Think about how QV should calculate a total result for the Calculation column if you check Expression Total. You should have just one explicit formula. In your case I would use IF, like this:&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&lt;BR /&gt;if([Account ID] = 'A100', sum(Values),&lt;BR /&gt;if([Account ID] = 'A200', avg(Values), sum(total Values)))&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 19 Jul 2010 18:51:41 GMT</pubDate>
    <dc:creator />
    <dc:date>2010-07-19T18:51:41Z</dc:date>
    <item>
      <title>Formula in a field</title>
      <link>https://community.qlik.com/t5/QlikView/Formula-in-a-field/m-p/227058#M79196</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I am trying to do something I thought would be easy:&lt;/P&gt;&lt;P&gt;I have Accounts and Values. For some accounts, I want to show sum(Values). For others, I have some other calculation. I thought I could add those in an Excel file and load them such as:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse; width: 105pt;" width="140"&gt;&lt;COL style="width: 57pt;" width="76" /&gt;&lt;COL style="width: 48pt;" width="64" /&gt;&lt;TBODY&gt;&lt;TR height="18" style="height: 13.2pt;"&gt;&lt;TD height="18" style="height: 13.2pt; width: 57pt;" width="76"&gt;Account ID&lt;/TD&gt;&lt;TD style="width: 48pt;" width="64"&gt;Calculation&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="18" style="height: 13.2pt;"&gt;&lt;TD height="18" style="height: 13.2pt;"&gt;A100&lt;/TD&gt;&lt;TD&gt;sum(Values)&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="18" style="height: 13.2pt;"&gt;&lt;TD height="18" style="height: 13.2pt;"&gt;A200&lt;/TD&gt;&lt;TD&gt;avg(Values)&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="18" style="height: 13.2pt;"&gt;&lt;TD height="18" style="height: 13.2pt;"&gt;A300&lt;/TD&gt;&lt;TD&gt;total(Values)&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;Now, in my tablebox, I have Account ID as a dimension and Calculation as an Expression. This shows me the text entered in Calculation. Is there a way to have it interpreted the formula?&lt;/P&gt;&lt;P&gt;Thanks and regards&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse; height: 6px;" width="175"&gt;&lt;TBODY&gt;&lt;TR height="18" style="height: 13.2pt;"&gt;&lt;TD height="18" style="height: 13.2pt; width: 57pt;" width="76"&gt;&lt;/TD&gt;&lt;TD style="width: 48pt;" width="64"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="18" style="height: 13.2pt;"&gt;&lt;TD height="18" style="height: 13.2pt;"&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="18" style="height: 13.2pt;"&gt;&lt;TD height="18" style="height: 13.2pt;"&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="18" style="height: 13.2pt;"&gt;&lt;TD height="18" style="height: 13.2pt;"&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Jul 2010 18:02:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Formula-in-a-field/m-p/227058#M79196</guid>
      <dc:creator />
      <dc:date>2010-07-19T18:02:57Z</dc:date>
    </item>
    <item>
      <title>Formula in a field</title>
      <link>https://community.qlik.com/t5/QlikView/Formula-in-a-field/m-p/227059#M79197</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It's not possible to do. It is breaking some chart concepts. Think about how QV should calculate a total result for the Calculation column if you check Expression Total. You should have just one explicit formula. In your case I would use IF, like this:&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&lt;BR /&gt;if([Account ID] = 'A100', sum(Values),&lt;BR /&gt;if([Account ID] = 'A200', avg(Values), sum(total Values)))&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Jul 2010 18:51:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Formula-in-a-field/m-p/227059#M79197</guid>
      <dc:creator />
      <dc:date>2010-07-19T18:51:41Z</dc:date>
    </item>
  </channel>
</rss>

