<?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: Using 'only' within a formula in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Using-only-within-a-formula/m-p/554251#M1124761</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Alternatively you can in the script do&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #800000;"&gt;Quantity&lt;/SPAN&gt; * &lt;SPAN style="color: #800000;"&gt;TradePrice&lt;/SPAN&gt; &lt;SPAN style="color: #0000ff;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;[# Amount]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then in the document&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: blue;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: #000000;"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: maroon;"&gt;RetailYear&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: #000000;"&gt; = {'2013'}&amp;gt;} &lt;SPAN style="color: #800000;"&gt;[# Amount]&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: medium; font-family: Calibri; color: #000000;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 06 Jan 2014 03:14:25 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2014-01-06T03:14:25Z</dc:date>
    <item>
      <title>Using 'only' within a formula</title>
      <link>https://community.qlik.com/t5/QlikView/Using-only-within-a-formula/m-p/554249#M1124759</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="line-height: 1.5em;"&gt;&lt;SPAN style="color: #000000; font-size: 12pt; font-family: Calibri;"&gt;Hi there,&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 1.5em;"&gt;&lt;SPAN style="color: #000000; font-size: 12pt; font-family: Calibri;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 1.5em;"&gt;&lt;SPAN style="color: #000000; font-size: 12pt; font-family: Calibri;"&gt;Completely novice to Qlikview so apologies for a simple question....&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 1.5em;"&gt;&lt;SPAN style="color: #000000; font-size: 12pt; font-family: Calibri;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 1.5em;"&gt;&lt;SPAN style="color: #000000; font-size: 12pt; font-family: Calibri;"&gt;I was originally using:&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 1.5em; color: blue; font-size: 9pt; font-family: 'Courier New';"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 1.5em;"&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: blue;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 9pt; font-family: 'Courier New';"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: maroon;"&gt;RetailYear&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 9pt; font-family: 'Courier New';"&gt; = {'2013'}&amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: maroon;"&gt;Quantity)&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: medium;"&gt;*TradePrice&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 11pt; font-family: Calibri, sans-serif;"&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: medium; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 11pt; font-family: Calibri, sans-serif;"&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: medium; line-height: 1.5em;"&gt;Which I then worked out will multiply the sum of the trade price by t&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: medium; line-height: 1.5em;"&gt;he sum of the quantity for the retail year 2013 which is not correct. &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 11pt; font-family: Calibri, sans-serif;"&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: medium; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt;&lt;SPAN style="line-height: 1.5em;"&gt;So I need to add 'only' into the &lt;/SPAN&gt;&lt;SPAN style="line-height: 24px;"&gt;formula so that it multiplies the trade price only, not the sum of the trade price. I've tried the below as it seems to make the most logical sense but it doesn't work (has an 'error in expression'). Where should the 'only' be?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #000000; font-family: Calibri; font-size: medium;"&gt;&lt;/P&gt;&lt;P style="color: #000000; font-family: Calibri; font-size: medium;"&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: blue;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New';"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: maroon;"&gt;RetailYear&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New';"&gt; = {'2013'}&amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: maroon;"&gt;Quantity)&lt;/SPAN&gt;*only(TradePrice)&lt;/P&gt;&lt;P style="color: #000000; font-family: Calibri; font-size: medium;"&gt;&lt;/P&gt;&lt;P style="color: #000000; font-family: Calibri; font-size: medium;"&gt;TIA&lt;/P&gt;&lt;P style="color: #000000; font-family: Calibri; font-size: medium;"&gt;&lt;/P&gt;&lt;P style="color: #000000; font-family: Calibri; font-size: medium;"&gt;Sarah&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 05 Jan 2014 23:28:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-only-within-a-formula/m-p/554249#M1124759</guid>
      <dc:creator />
      <dc:date>2014-01-05T23:28:36Z</dc:date>
    </item>
    <item>
      <title>Re: Using 'only' within a formula</title>
      <link>https://community.qlik.com/t5/QlikView/Using-only-within-a-formula/m-p/554250#M1124760</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;SPAN style="color: #0000ff; font-size: 12px; font-family: 'Courier New';"&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: blue;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: #000000;"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: maroon;"&gt;RetailYear&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: #000000;"&gt; = {'2013'}&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: maroon;"&gt;Quantity &lt;/SPAN&gt;&lt;SPAN style="font-size: medium; font-family: Calibri; color: #000000;"&gt;* TradePrice)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: medium; font-family: Calibri;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt;Only returns a single value if the selected field has a single value otherwise it returns null.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Jan 2014 00:28:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-only-within-a-formula/m-p/554250#M1124760</guid>
      <dc:creator>Colin-Albert</dc:creator>
      <dc:date>2014-01-06T00:28:56Z</dc:date>
    </item>
    <item>
      <title>Re: Using 'only' within a formula</title>
      <link>https://community.qlik.com/t5/QlikView/Using-only-within-a-formula/m-p/554251#M1124761</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Alternatively you can in the script do&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #800000;"&gt;Quantity&lt;/SPAN&gt; * &lt;SPAN style="color: #800000;"&gt;TradePrice&lt;/SPAN&gt; &lt;SPAN style="color: #0000ff;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;[# Amount]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then in the document&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: blue;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: #000000;"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: maroon;"&gt;RetailYear&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: #000000;"&gt; = {'2013'}&amp;gt;} &lt;SPAN style="color: #800000;"&gt;[# Amount]&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: medium; font-family: Calibri; color: #000000;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Jan 2014 03:14:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-only-within-a-formula/m-p/554251#M1124761</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-01-06T03:14:25Z</dc:date>
    </item>
    <item>
      <title>Re: Using 'only' within a formula</title>
      <link>https://community.qlik.com/t5/QlikView/Using-only-within-a-formula/m-p/554252#M1124762</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Better you do this calculation in script only.&lt;/P&gt;&lt;P&gt;or use max/min instead of only in expression if you are having single tradeprice of every item in price master..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Jan 2014 04:38:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-only-within-a-formula/m-p/554252#M1124762</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-01-06T04:38:03Z</dc:date>
    </item>
    <item>
      <title>Re: Using 'only' within a formula</title>
      <link>https://community.qlik.com/t5/QlikView/Using-only-within-a-formula/m-p/554253#M1124763</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;You Can create value like,&lt;/P&gt;&lt;P&gt;As per Michael Answer,&lt;/P&gt;&lt;P&gt;Let vAmt = Num(&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #800000;"&gt;Quantity&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt; * &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #800000;"&gt;TradePrice&lt;/SPAN&gt;,'&amp;lt;Format &amp;gt;');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then, &lt;/P&gt;&lt;P&gt;Sum ({RetailYear = { '2013'}&amp;gt;} $(vAmt)} &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Raja.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Jan 2014 04:38:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-only-within-a-formula/m-p/554253#M1124763</guid>
      <dc:creator />
      <dc:date>2014-01-06T04:38:51Z</dc:date>
    </item>
  </channel>
</rss>

