<?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 Creating a formula as a variable in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Creating-a-formula-as-a-variable/m-p/159357#M34038</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thankyou both, I used a little from each reply to make it work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is much more efficient&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;David&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 19 Aug 2009 12:59:58 GMT</pubDate>
    <dc:creator />
    <dc:date>2009-08-19T12:59:58Z</dc:date>
    <item>
      <title>Creating a formula as a variable</title>
      <link>https://community.qlik.com/t5/QlikView/Creating-a-formula-as-a-variable/m-p/159354#M34035</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have created a variable for my formula that calculates total Sales among the format settings (see the last line). My goal is to be able to enter the formula of Sum(vSalesFormula) into an expression in any report and for "if(Sales&amp;gt;1,Sales)) + sum(Sales2)" to be inserted where vSalesFormula is and it calculate.&lt;/P&gt;&lt;P&gt;This way as I add more reports I can adjust all reports at the same time by adjusting the formula below instead of going into each expression in each report.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;&lt;BR /&gt;SET ThousandSep=',';&lt;BR /&gt;SET DecimalSep='.';&lt;BR /&gt;SET MoneyThousandSep=',';&lt;BR /&gt;SET MoneyDecimalSep='.';&lt;BR /&gt;SET MoneyFormat='$#,##0.00;-$#,##0.00';&lt;BR /&gt;SET TimeFormat='h:mm:ss TT';&lt;BR /&gt;SET DateFormat='D/MM/YYYY';&lt;BR /&gt;SET TimestampFormat='D/MM/YYYY h:mm:ss[.fff] TT';&lt;BR /&gt;SET MonthNames='Jan;Feb;Mar;Apr;May;Jun;Jul;Aug;Sep;Oct;Nov;Dec';&lt;BR /&gt;SET DayNames='Mon;Tue;Wed;Thu;Fri;Sat;Sun';&lt;BR /&gt;SET vSalesFormula = '(if(Sales&amp;gt;1,Sales)) + sum(Sales2))';&lt;BR /&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;This isn't working.... can anyone see a way to fix this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;David&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Aug 2009 12:18:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Creating-a-formula-as-a-variable/m-p/159354#M34035</guid>
      <dc:creator />
      <dc:date>2009-08-18T12:18:18Z</dc:date>
    </item>
    <item>
      <title>AW:Creating a formula as a variable</title>
      <link>https://community.qlik.com/t5/QlikView/Creating-a-formula-as-a-variable/m-p/159355#M34036</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;try to use &lt;STRONG&gt;&lt;EM&gt;$(#vSalesFormula)&lt;/EM&gt;&lt;/STRONG&gt; in your expression (numerical evaluation of a variable).&lt;/P&gt;&lt;P&gt;Rgds,&lt;BR /&gt;Joachim&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Aug 2009 16:18:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Creating-a-formula-as-a-variable/m-p/159355#M34036</guid>
      <dc:creator>biester</dc:creator>
      <dc:date>2009-08-18T16:18:41Z</dc:date>
    </item>
    <item>
      <title>Creating a formula as a variable</title>
      <link>https://community.qlik.com/t5/QlikView/Creating-a-formula-as-a-variable/m-p/159356#M34037</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;UL&gt;&lt;LI&gt;First of all the number of brackets seem to be incorrect; I count 3 starting brackets and 4 ending brackets. The last one should be removed.&lt;/LI&gt;&lt;LI&gt;Secondly, try to remove the quotes around the formula.&lt;/LI&gt;&lt;LI&gt;Then still it will only work when Sales is unique for each dimension in the chart; otherwise you probably need to use If(Sum(Sales)&amp;gt;1, Sum(Sales)) + Sum(Sales2)&lt;/LI&gt;&lt;/UL&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Aug 2009 17:57:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Creating-a-formula-as-a-variable/m-p/159356#M34037</guid>
      <dc:creator>eric_dielessen</dc:creator>
      <dc:date>2009-08-18T17:57:15Z</dc:date>
    </item>
    <item>
      <title>Creating a formula as a variable</title>
      <link>https://community.qlik.com/t5/QlikView/Creating-a-formula-as-a-variable/m-p/159357#M34038</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thankyou both, I used a little from each reply to make it work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is much more efficient&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;David&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Aug 2009 12:59:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Creating-a-formula-as-a-variable/m-p/159357#M34038</guid>
      <dc:creator />
      <dc:date>2009-08-19T12:59:58Z</dc:date>
    </item>
  </channel>
</rss>

