<?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 Expression help please in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Expression-help-please/m-p/1092411#M918525</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Below expression is not working.What am I doing wrong here ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if([Lease Type] = 'Owned' and &lt;/P&gt;&lt;P&gt; if ([Lease Type] = 'Our Subtenant' , &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Sum([Rentable Area (sq ft)]*-1)),sum([Rentable Area (sq ft)]))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks much&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
    <dc:creator />
    <dc:date>2020-11-25T16:16:04Z</dc:date>
    <item>
      <title>Expression help please</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-help-please/m-p/1092411#M918525</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Below expression is not working.What am I doing wrong here ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if([Lease Type] = 'Owned' and &lt;/P&gt;&lt;P&gt; if ([Lease Type] = 'Our Subtenant' , &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Sum([Rentable Area (sq ft)]*-1)),sum([Rentable Area (sq ft)]))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks much&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-help-please/m-p/1092411#M918525</guid>
      <dc:creator />
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Expression help please</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-help-please/m-p/1092412#M918526</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The syntax is not correct. What do you want to do?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A field value for [Lease Type] can't be 'Owned' AND ''Our Subtenant' at the same time.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 May 2016 21:57:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-help-please/m-p/1092412#M918526</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-05-06T21:57:04Z</dc:date>
    </item>
    <item>
      <title>Re: Expression help please</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-help-please/m-p/1092413#M918527</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/123802_Capture.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;I have data like above.I want to convert the&amp;nbsp; rentable area for 'our Subtenant' to - ve value only if the Building id has lease type owned and Our subtenant else keep it as is.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 May 2016 22:04:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-help-please/m-p/1092413#M918527</guid>
      <dc:creator />
      <dc:date>2016-05-06T22:04:44Z</dc:date>
    </item>
    <item>
      <title>Re: Expression help please</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-help-please/m-p/1092414#M918528</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TMP:&lt;/P&gt;&lt;P&gt;LOAD building, RentableArea, LeaseType&lt;/P&gt;&lt;P&gt;FROM ...;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LEFT JOIN&lt;/P&gt;&lt;P&gt;LOAD building, Max(if( LeaseType= 'Owned',1,0)) AS OwnedFlag&lt;/P&gt;&lt;P&gt;RESIDENT TMP;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD building, RentableArea, LeaseType,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(OwnedFlag AND LeaseType='Our Subtenant',-1,1)*RentableArea as NewArea &lt;/P&gt;&lt;P&gt;RESIDENT TMP;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DROP TABLE TMP;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 May 2016 22:12:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-help-please/m-p/1092414#M918528</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-05-06T22:12:44Z</dc:date>
    </item>
    <item>
      <title>Re: Expression help please</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-help-please/m-p/1092415#M918529</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;please post a sample application&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Marco&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 May 2016 23:37:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-help-please/m-p/1092415#M918529</guid>
      <dc:creator>MarcoWedel</dc:creator>
      <dc:date>2016-05-06T23:37:47Z</dc:date>
    </item>
    <item>
      <title>Re: Expression help please</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-help-please/m-p/1092416#M918531</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Better to use set Analysis in your expression&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; sum({$&amp;lt;[Lease Type] = {'Owned'},[Lease Type] = {'Our Subtenant'} &amp;gt;}[Rentable Area (sq ft)]*-1)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 07 May 2016 04:25:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-help-please/m-p/1092416#M918531</guid>
      <dc:creator>ziadm</dc:creator>
      <dc:date>2016-05-07T04:25:25Z</dc:date>
    </item>
    <item>
      <title>Re: Expression help please</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-help-please/m-p/1092417#M918532</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Pavana,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use OR operator instead of AND operator because it is not possible same field held two values at the same time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;Ishfaque Ahmed&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 07 May 2016 07:03:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-help-please/m-p/1092417#M918532</guid>
      <dc:creator>engishfaque</dc:creator>
      <dc:date>2016-05-07T07:03:06Z</dc:date>
    </item>
    <item>
      <title>Re: Expression help please</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-help-please/m-p/1092418#M918534</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;Your condition should be changed like this:&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Sum(&lt;/SPAN&gt;if([Lease Type] = 'Owned' or [&lt;SPAN style="line-height: 1.5em;"&gt;Lease Type] = 'Our Subtenant' ,&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;&amp;nbsp;&amp;nbsp; ([Rentable Area (sq ft)]*-1), ([Rentable Area (sq ft)]))&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;When you write AND clause on the same field, it will not result true, it will be false.&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&gt;Try creating this condition at script level without sum function and create it as separate field and use in front end chart.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Srini.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 07 May 2016 07:15:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-help-please/m-p/1092418#M918534</guid>
      <dc:creator>rrsrini2907</dc:creator>
      <dc:date>2016-05-07T07:15:59Z</dc:date>
    </item>
    <item>
      <title>Re: Expression help please</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-help-please/m-p/1092419#M918536</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The OwnedFlag could probably also created like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;LEFT JOIN&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;LOAD building, 1 AS OwnedFlag&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;RESIDENT TMP&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;WHERE LeaseType = 'Owned';&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;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Assuming there is only 1 such Lease Type per building at maximum.&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;Alternatively, you can use a mapping approach:&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;MAP:&lt;BR /&gt;MAPPING LOAD&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;building, 1 as OwnedFlag&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;FROM ....&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;WHERE LeaseType = 'Owned';&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;LOAD building, RentableArea, LeaseType,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(ApplyMap('MAP',building,0)&amp;nbsp; AND LeaseType='Our Subtenant',-1,1)*RentableArea as NewArea&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;RESIDENT TMP;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;DROP TABLE TMP;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In all my suggestions, you may need to adapt the field names to the ones you are using.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 07 May 2016 09:10:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-help-please/m-p/1092419#M918536</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-05-07T09:10:24Z</dc:date>
    </item>
  </channel>
</rss>

