<?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 problem using set analysis with IF statement in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/problem-using-set-analysis-with-IF-statement/m-p/258197#M97489</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;Try this:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN lang="EN-US" style="color: #636363; font-family: 'Courier New'; font-size: 7pt;"&gt;=IF(&lt;/SPAN&gt;&lt;SPAN class="jive-sql-keyword"&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="color: navy; font-family: 'Courier New'; font-size: 7pt;"&gt;Sum&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt; &lt;SPAN&gt;&lt;SPAN lang="EN-US" style="color: #636363; font-family: 'Courier New'; font-size: 7pt;"&gt;({$&amp;lt;SiteName = {"Rochester"} &amp;gt;} Schedule)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style="text-decoration: underline;"&gt;&lt;SPAN lang="EN-US" style="color: #636363; font-family: 'Courier New'; font-size: 7pt;"&gt;&amp;gt;0,&lt;/SPAN&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN&gt;&lt;STRONG&gt;&lt;EM style="text-decoration: underline;"&gt; &lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="jive-sql-keyword"&gt;&lt;STRONG&gt;&lt;EM style="text-decoration: underline;"&gt;&lt;SPAN lang="EN-US" style="color: navy; font-family: 'Courier New'; font-size: 7pt;"&gt;Sum&lt;/SPAN&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN lang="EN-US" style="color: #636363; font-family: 'Courier New'; font-size: 7pt;"&gt;({$&amp;lt;SiteName = {"Rochester"} &amp;gt;} Schedule) -&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN lang="EN-US" style="color: #636363; font-family: 'Courier New'; font-size: 7pt;"&gt; &lt;/SPAN&gt;&lt;SPAN class="jive-sql-keyword"&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="color: navy; font-family: 'Courier New'; font-size: 7pt;"&gt;Sum&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN lang="EN-US" style="color: #636363; font-family: 'Courier New'; font-size: 7pt;"&gt;( {$ &amp;lt;SiteName= {"Rochester"} &amp;gt;} Amount), &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN lang="EN-US" style="color: #636363; font-family: 'Courier New'; font-size: 7pt;"&gt;0)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN lang="EN-US" style="color: #636363; font-family: 'Courier New'; font-size: 7pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;If above will not work, it must be something with your data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Janusz&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 06 Jul 2011 13:07:43 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-07-06T13:07:43Z</dc:date>
    <item>
      <title>problem using set analysis with IF statement</title>
      <link>https://community.qlik.com/t5/QlikView/problem-using-set-analysis-with-IF-statement/m-p/258192#M97484</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi community!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have an IF statement (that works) as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=IF(Sum (Schedule) &amp;gt;0), Sum(Schedule) - Sum(Amount), 0)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when I introduce set analysis into this IF statement, it doesn't work anymore.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=IF(Sum ( {$&amp;lt;SiteName = {Rochester} Schedule) &amp;gt;0), Sum( {$&amp;lt;SiteName = {Rochester} Schedule) - Sum( {$&amp;lt;SiteName = {Rochester} Amount), 0)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One thing to note is that the SiteName is from a Load Inline statement like below.&amp;nbsp; I don't know if this is causing any of my issues however.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;SiteLoc:&lt;/P&gt;&lt;P&gt;LOAD * INLINE [&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SiteName, Site, BrandType&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Rochester, 4005, MHL&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Rochester, 4045, MHL&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Rochester, 4043, MHL&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Rochester, 4305, USB&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Rochester, 4345, USB&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Rochester, 4343, USB&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Wisconsin, 4007, MHL&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Wisconsin, 4055, MHL&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Wisconsin, 4307, USB&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Wisconsin, 4355, USB&lt;BR /&gt;]; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Does anybody know why i'm having these issues?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Jul 2011 18:35:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/problem-using-set-analysis-with-IF-statement/m-p/258192#M97484</guid>
      <dc:creator />
      <dc:date>2011-07-05T18:35:41Z</dc:date>
    </item>
    <item>
      <title>Re: problem using set analysis with IF statement</title>
      <link>https://community.qlik.com/t5/QlikView/problem-using-set-analysis-with-IF-statement/m-p/258193#M97485</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi! Not sure that it's the whole solution but there are syntax errors. Try:&lt;/P&gt;&lt;PRE __default_attr="sql" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;&lt;P&gt;=IF(Sum ( {$&amp;lt;SiteName = {Rochester}&amp;gt;} Schedule) &amp;gt;0), Sum( {$&amp;lt;SiteName = {Rochester}&amp;gt;} Schedule) - Sum( {$&amp;lt;SiteName = {Rochester}&amp;gt;} Amount), 0)&lt;/P&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Jul 2011 19:10:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/problem-using-set-analysis-with-IF-statement/m-p/258193#M97485</guid>
      <dc:creator />
      <dc:date>2011-07-05T19:10:07Z</dc:date>
    </item>
    <item>
      <title>Re: problem using set analysis with IF statement</title>
      <link>https://community.qlik.com/t5/QlikView/problem-using-set-analysis-with-IF-statement/m-p/258194#M97486</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Hi Thomas,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry about my bad syntax, but the syntax is not the issue.&amp;nbsp; Your solution/syntax is correct, but it just won't work in my document for some reason.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Jul 2011 19:50:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/problem-using-set-analysis-with-IF-statement/m-p/258194#M97486</guid>
      <dc:creator />
      <dc:date>2011-07-05T19:50:58Z</dc:date>
    </item>
    <item>
      <title>Re: problem using set analysis with IF statement</title>
      <link>https://community.qlik.com/t5/QlikView/problem-using-set-analysis-with-IF-statement/m-p/258195#M97487</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you also post a load inline with Schedule, amount and the key to the sitename table? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Jul 2011 12:57:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/problem-using-set-analysis-with-IF-statement/m-p/258195#M97487</guid>
      <dc:creator>erichshiino</dc:creator>
      <dc:date>2011-07-06T12:57:04Z</dc:date>
    </item>
    <item>
      <title>problem using set analysis with IF statement</title>
      <link>https://community.qlik.com/t5/QlikView/problem-using-set-analysis-with-IF-statement/m-p/258196#M97488</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;the expression is still wrong:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE class="jive-code jive-sql"&gt;=IF(&lt;SPAN class="jive-sql-keyword"&gt;Sum&lt;/SPAN&gt; ( {$&amp;lt;SiteName = {Rochester}&amp;gt;} Schedule) &lt;SPAN style="text-decoration: underline;"&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;gt;0, &lt;SPAN class="jive-sql-keyword"&gt;Sum&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/SPAN&gt;( {$&amp;lt;SiteName = {Rochester}&amp;gt;} Schedule) - &lt;SPAN class="jive-sql-keyword"&gt;Sum&lt;/SPAN&gt;( {$&amp;lt;SiteName = {Rochester}&amp;gt;} Amount), 0)&lt;BR /&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Jul 2011 13:02:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/problem-using-set-analysis-with-IF-statement/m-p/258196#M97488</guid>
      <dc:creator>brenner_martina</dc:creator>
      <dc:date>2011-07-06T13:02:54Z</dc:date>
    </item>
    <item>
      <title>problem using set analysis with IF statement</title>
      <link>https://community.qlik.com/t5/QlikView/problem-using-set-analysis-with-IF-statement/m-p/258197#M97489</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;Try this:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN lang="EN-US" style="color: #636363; font-family: 'Courier New'; font-size: 7pt;"&gt;=IF(&lt;/SPAN&gt;&lt;SPAN class="jive-sql-keyword"&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="color: navy; font-family: 'Courier New'; font-size: 7pt;"&gt;Sum&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt; &lt;SPAN&gt;&lt;SPAN lang="EN-US" style="color: #636363; font-family: 'Courier New'; font-size: 7pt;"&gt;({$&amp;lt;SiteName = {"Rochester"} &amp;gt;} Schedule)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style="text-decoration: underline;"&gt;&lt;SPAN lang="EN-US" style="color: #636363; font-family: 'Courier New'; font-size: 7pt;"&gt;&amp;gt;0,&lt;/SPAN&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN&gt;&lt;STRONG&gt;&lt;EM style="text-decoration: underline;"&gt; &lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="jive-sql-keyword"&gt;&lt;STRONG&gt;&lt;EM style="text-decoration: underline;"&gt;&lt;SPAN lang="EN-US" style="color: navy; font-family: 'Courier New'; font-size: 7pt;"&gt;Sum&lt;/SPAN&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN lang="EN-US" style="color: #636363; font-family: 'Courier New'; font-size: 7pt;"&gt;({$&amp;lt;SiteName = {"Rochester"} &amp;gt;} Schedule) -&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN lang="EN-US" style="color: #636363; font-family: 'Courier New'; font-size: 7pt;"&gt; &lt;/SPAN&gt;&lt;SPAN class="jive-sql-keyword"&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="color: navy; font-family: 'Courier New'; font-size: 7pt;"&gt;Sum&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN lang="EN-US" style="color: #636363; font-family: 'Courier New'; font-size: 7pt;"&gt;( {$ &amp;lt;SiteName= {"Rochester"} &amp;gt;} Amount), &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN lang="EN-US" style="color: #636363; font-family: 'Courier New'; font-size: 7pt;"&gt;0)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN lang="EN-US" style="color: #636363; font-family: 'Courier New'; font-size: 7pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;If above will not work, it must be something with your data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Janusz&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Jul 2011 13:07:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/problem-using-set-analysis-with-IF-statement/m-p/258197#M97489</guid>
      <dc:creator />
      <dc:date>2011-07-06T13:07:43Z</dc:date>
    </item>
  </channel>
</rss>

