<?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: Use field value in expression, without having it as a dimension in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Use-field-value-in-expression-without-having-it-as-a-dimension/m-p/898332#M312540</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here's a sample of the data. If month 1 and 2 are selected then the dollar amount (AMDOL) for the 2nd&amp;nbsp; '_B'&amp;nbsp; record should be excluded from the totals. So the SUM() function needs to exclude the set of records where [APP]='_B' and [Month #] &amp;gt; min(Month).&lt;/P&gt;&lt;P&gt;something like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum({$&amp;lt;[Location] -= {'790','791','793','794','795','796','797','798','799'},[APP] -= {'CE'},&lt;/P&gt;&lt;P&gt;(exlude this set ([APP] = ‘_B’ AND [Month#] &amp;gt; min(Month) )&amp;nbsp; &amp;gt;} AMDOL),&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="sampledata.jpg" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/85002_sampledata.jpg" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 24 Apr 2015 13:54:05 GMT</pubDate>
    <dc:creator>ken_geren</dc:creator>
    <dc:date>2015-04-24T13:54:05Z</dc:date>
    <item>
      <title>Use field value in expression, without having it as a dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Use-field-value-in-expression-without-having-it-as-a-dimension/m-p/898328#M312536</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am using a chart pivot table and need to create an expression to create account balances, however certain records should be excluded based on a field value. The field name is APP, it is in the fact table but not used on the pivot table.&amp;nbsp; The expression results are only correct if the field is added to the pivot table. Is this a restriction with QlikView? If not, how do I get the field value in the expression?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the expression. &lt;/P&gt;&lt;P&gt;If(&lt;/P&gt;&lt;P&gt;[APP]='_B', &lt;/P&gt;&lt;P&gt;sum({$&amp;lt;[Location] -= {'790','791','793','794','795','796','797','798','799'},[APP] -= {'CE'}, [Month #]={"$(=min(Month))"} &amp;gt;} AMDOL),&lt;/P&gt;&lt;P&gt;sum({$&amp;lt;[Location] -= {'790','791','793','794','795','796','797','798','799'},[APP] -= {'CE'} &amp;gt;}AMDOL))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Apr 2015 20:14:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Use-field-value-in-expression-without-having-it-as-a-dimension/m-p/898328#M312536</guid>
      <dc:creator>ken_geren</dc:creator>
      <dc:date>2015-04-23T20:14:34Z</dc:date>
    </item>
    <item>
      <title>Re: Use field value in expression, without having it as a dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Use-field-value-in-expression-without-having-it-as-a-dimension/m-p/898329#M312537</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ken, when you do this&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;If(&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;[APP]='_B',&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;and APP is not a dimension, &lt;SPAN style="line-height: 1.5em;"&gt;QlikView will actually apply aggregate function ONLY so it will actually be&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;If(&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;ONLY( [APP] ) ='_B',&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;since this is not the case with you data and because ONLY returns only one value and null otherwise, your expression would not work properly.&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;is the only different between two expressions that one is for the oldest month while the other one is not?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Apr 2015 21:19:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Use-field-value-in-expression-without-having-it-as-a-dimension/m-p/898329#M312537</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-04-23T21:19:00Z</dc:date>
    </item>
    <item>
      <title>Re: Use field value in expression, without having it as a dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Use-field-value-in-expression-without-having-it-as-a-dimension/m-p/898330#M312538</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The application is displaying account balances. The fact table has beginning account balances for each month ( APP = "_B"). If multiple months are selected then only the beginning balance for the first month should be used. The expression shown is adding up the beginning balance for each month. (Wish I could find a bank that does that.)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a way to add the APP field as a dimension but not have to displayed or summarized by that field? When I added this field as a dimension then I got totals by account#/APP. The totals must only be by account#.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Apr 2015 00:36:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Use-field-value-in-expression-without-having-it-as-a-dimension/m-p/898330#M312538</guid>
      <dc:creator>ken_geren</dc:creator>
      <dc:date>2015-04-24T00:36:43Z</dc:date>
    </item>
    <item>
      <title>Re: Use field value in expression, without having it as a dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Use-field-value-in-expression-without-having-it-as-a-dimension/m-p/898331#M312539</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;use as dimension but not add as dimension - no, it does not really make sense and does not work like that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But if I get it, you can just do something like this as your expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if ( GetSelectedCount(Month) = 1,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; expression1,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; expression2&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Apr 2015 13:36:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Use-field-value-in-expression-without-having-it-as-a-dimension/m-p/898331#M312539</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-04-24T13:36:26Z</dc:date>
    </item>
    <item>
      <title>Re: Use field value in expression, without having it as a dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Use-field-value-in-expression-without-having-it-as-a-dimension/m-p/898332#M312540</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here's a sample of the data. If month 1 and 2 are selected then the dollar amount (AMDOL) for the 2nd&amp;nbsp; '_B'&amp;nbsp; record should be excluded from the totals. So the SUM() function needs to exclude the set of records where [APP]='_B' and [Month #] &amp;gt; min(Month).&lt;/P&gt;&lt;P&gt;something like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum({$&amp;lt;[Location] -= {'790','791','793','794','795','796','797','798','799'},[APP] -= {'CE'},&lt;/P&gt;&lt;P&gt;(exlude this set ([APP] = ‘_B’ AND [Month#] &amp;gt; min(Month) )&amp;nbsp; &amp;gt;} AMDOL),&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="sampledata.jpg" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/85002_sampledata.jpg" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Apr 2015 13:54:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Use-field-value-in-expression-without-having-it-as-a-dimension/m-p/898332#M312540</guid>
      <dc:creator>ken_geren</dc:creator>
      <dc:date>2015-04-24T13:54:05Z</dc:date>
    </item>
    <item>
      <title>Re: Use field value in expression, without having it as a dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Use-field-value-in-expression-without-having-it-as-a-dimension/m-p/898333#M312541</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Found to solutions to this problem&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Solution 1&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;({$&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;[Location]&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt; -=&lt;BR /&gt;{'790','791','793','794','795','796','797','798','799'},&lt;/SPAN&gt;&lt;SPAN style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;[APP]&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt; -= {'CE','_B'}&lt;BR /&gt;&amp;gt;} AMDOL)&lt;BR /&gt;+sum({$&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;[Location]&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt; -= {'790','791','793','794','795','796','797','798','799'},&lt;/SPAN&gt;&lt;SPAN style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;[APP]&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt; = {'_B'}, &lt;/SPAN&gt;&lt;SPAN style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;[Month #]&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;={&lt;/SPAN&gt;&lt;SPAN style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;"$(=min(Month))"&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;} &amp;gt;} AMDOL) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or Solution 2&lt;/P&gt;&lt;P&gt;sum({$&amp;lt;[Location] -= {'790','791','793','794','795','796','797','798','799'},[APP] -= {'CE'} &amp;gt;} if([APP]='_B' AND [Month #]=$(=min(Month)),AMDOL,IF([APP]&amp;lt;&amp;gt;'_B',AMDOL,0)))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 25 Apr 2015 12:23:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Use-field-value-in-expression-without-having-it-as-a-dimension/m-p/898333#M312541</guid>
      <dc:creator>ken_geren</dc:creator>
      <dc:date>2015-04-25T12:23:20Z</dc:date>
    </item>
  </channel>
</rss>

