<?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: Set analysis and IF statement in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-analysis-and-IF-statement/m-p/693252#M1066585</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;They're in charts, with the values on each data point, so I can see the differences clearly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The dimension is calendar week in both cases on a bar chart&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 02 Sep 2014 16:34:17 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-09-02T16:34:17Z</dc:date>
    <item>
      <title>Set analysis and IF statement</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-and-IF-statement/m-p/693248#M1066580</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have an expression;&lt;/P&gt;&lt;P&gt;=sum(IF(DIRECTION='B',-[TRADE SIZE],[TRADE SIZE])*PRICE/100)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I select the value 'YES' in the field 'IS FIXING TRADE' it gives me a particular number. However, I need to adapt this expression elsewhere in my doc and stipulate&amp;nbsp; 'IS FIXING TRADE' is always YES.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is how i adpated it&lt;/P&gt;&lt;P&gt;=sum({$&amp;lt;[IS FIXING TRADE]={'YES'}&amp;gt;}(IF(DIRECTION='B',-[TRADE SIZE],[TRADE SIZE])*PRICE/100))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem is that I get two different results, when they should be the same. What am I doing wrong in my second expression that means the result is different to the first where I manually select the 'YES' value.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Sep 2014 16:19:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-and-IF-statement/m-p/693248#M1066580</guid>
      <dc:creator />
      <dc:date>2014-09-02T16:19:02Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis and IF statement</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-and-IF-statement/m-p/693249#M1066581</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How about moving the IF to your load script with something like :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IF(DIRECTION='B',-[TRADE SIZE],[TRADE SIZE])*PRICE/100&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; as [CalcSize] ,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Then the Set Analysis should simplify to :&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; =sum({$&amp;lt;[IS FIXING TRADE]={'YES'}&amp;gt;} &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt; [CalcSize] )&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Sep 2014 16:23:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-and-IF-statement/m-p/693249#M1066581</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-09-02T16:23:53Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis and IF statement</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-and-IF-statement/m-p/693250#M1066582</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, i supposed this would work. Thanks Bill&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However I am still curious as to what i was doing wrong in my expression!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Sep 2014 16:30:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-and-IF-statement/m-p/693250#M1066582</guid>
      <dc:creator />
      <dc:date>2014-09-02T16:30:55Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis and IF statement</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-and-IF-statement/m-p/693251#M1066583</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It seems like the expression should work, at first glance. What is the context around these two expressions, are they in charts, text objects, etc?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If they are in charts, try putting them side-by-side in text objects to see if there is still a discrepancy.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Sep 2014 16:31:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-and-IF-statement/m-p/693251#M1066583</guid>
      <dc:creator />
      <dc:date>2014-09-02T16:31:00Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis and IF statement</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-and-IF-statement/m-p/693252#M1066585</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;They're in charts, with the values on each data point, so I can see the differences clearly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The dimension is calendar week in both cases on a bar chart&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Sep 2014 16:34:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-and-IF-statement/m-p/693252#M1066585</guid>
      <dc:creator />
      <dc:date>2014-09-02T16:34:17Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis and IF statement</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-and-IF-statement/m-p/693253#M1066587</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Apologies if I was unclear. I use text objects as a troubleshooting step for expressions not because it is easier to see the difference, but because it rules out any properties specific to the chart/dimensions as the problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I suspect there is something related to the data model going on here, as your expression is working fine for me on a small amount of demo data.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Sep 2014 16:49:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-and-IF-statement/m-p/693253#M1066587</guid>
      <dc:creator />
      <dc:date>2014-09-02T16:49:50Z</dc:date>
    </item>
  </channel>
</rss>

