<?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 IF Statement syntax in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-analysis-IF-Statement-syntax/m-p/535759#M481803</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;unfortunately this did not work resulted in 0 result in the column POPrice&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;however when i used the&amp;nbsp; following Set analysis Statement it worked.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is there any difference?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum({&amp;lt;Itemnumber=, ItemstatusToday ={6,7}, C={'USD'} &amp;gt;} POPrice)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 18 Sep 2013 08:43:35 GMT</pubDate>
    <dc:creator />
    <dc:date>2013-09-18T08:43:35Z</dc:date>
    <item>
      <title>Set analysis IF Statement syntax</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-IF-Statement-syntax/m-p/535757#M481801</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi. i have the following scenario&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Itemnumber &lt;/LI&gt;&lt;LI&gt;ItemstatusToday = 1,2,6,7&lt;/LI&gt;&lt;LI&gt;Currency = USD, EUR&lt;/LI&gt;&lt;LI&gt;Purchase Price&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The business rule states when&amp;nbsp; Item Status is 6 or 7 show the Purchase Price in USD for the article number.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have the following statement however it requires that an article number is selected to work otherwise it is blank. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this means i need to use set analysis, but i am unable to get the syntax right. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;below is my code today.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum(if(ItemstatusToday =6 or ItemstatusToday =7 and C = 'USD',POPrice)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and with the attempt of set analysis below;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum(if(ItemstatusToday =6 or ItemstatusToday =7 and C = 'USD',)),&lt;/P&gt;&lt;P&gt;$&amp;lt;Itemnumber= {Itemnumber}&amp;gt;} POPrice&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;any help would be greatly appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best&lt;/P&gt;&lt;P&gt;Bradley&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Sep 2013 08:07:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-IF-Statement-syntax/m-p/535757#M481801</guid>
      <dc:creator />
      <dc:date>2013-09-18T08:07:35Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis IF Statement syntax</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-IF-Statement-syntax/m-p/535758#M481802</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Try sum({&amp;lt;Itemnumber={'$(=only(Itemnumber))'},ItemstatusToday={6,7},C={'USD'} &amp;gt;}POPrice)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Sep 2013 08:32:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-IF-Statement-syntax/m-p/535758#M481802</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2013-09-18T08:32:04Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis IF Statement syntax</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-IF-Statement-syntax/m-p/535759#M481803</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;unfortunately this did not work resulted in 0 result in the column POPrice&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;however when i used the&amp;nbsp; following Set analysis Statement it worked.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is there any difference?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum({&amp;lt;Itemnumber=, ItemstatusToday ={6,7}, C={'USD'} &amp;gt;} POPrice)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Sep 2013 08:43:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-IF-Statement-syntax/m-p/535759#M481803</guid>
      <dc:creator />
      <dc:date>2013-09-18T08:43:35Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis IF Statement syntax</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-IF-Statement-syntax/m-p/535760#M481804</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;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;sum({$&amp;lt;ItemstatusToday ={'6','7'}, C={'USD'} &amp;gt;} POPrice)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Sep 2013 08:47:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-IF-Statement-syntax/m-p/535760#M481804</guid>
      <dc:creator>er_mohit</dc:creator>
      <dc:date>2013-09-18T08:47:00Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis IF Statement syntax</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-IF-Statement-syntax/m-p/535761#M481805</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;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;sum({&amp;lt;Itemnumber={'$(=sum(Distinct&amp;nbsp; Itemnumber))'},ItemstatusToday={6,7},C={'USD'} &amp;gt;}POPrice)&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;****************************************************************************************&lt;/P&gt;&lt;P&gt;or try this&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Try sum({&amp;lt;Itemnumber={'$(=only(Itemnumber))'},ItemstatusToday={6,7},C={'USD'} &amp;gt;}POPrice)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;**************************************************************************************&lt;/P&gt;&lt;P&gt;or try this&lt;/P&gt;&lt;P&gt;sum({&amp;lt;Itemnumber=, ItemstatusToday ={6,7}, C={'USD'} &amp;gt;} POPrice)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Sep 2013 08:52:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-IF-Statement-syntax/m-p/535761#M481805</guid>
      <dc:creator />
      <dc:date>2013-09-18T08:52:32Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis IF Statement syntax</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-IF-Statement-syntax/m-p/535762#M481806</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, there's a difference. &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px; background-color: #f6f6f6;"&gt;Itemnumber={'$(=only(Itemnumber))'}&lt;/SPAN&gt; means that one and only one Itemnumber must be selected or the expression won't return a result. &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px; background-color: #f6f6f6;"&gt;Itemnumber=&lt;/SPAN&gt; means that any selection in the field Itemnumber will be ignored and all item numbers will be used for the calculation.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Sep 2013 08:56:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-IF-Statement-syntax/m-p/535762#M481806</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2013-09-18T08:56:36Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis IF Statement syntax</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-IF-Statement-syntax/m-p/535763#M481807</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for your explanation.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Sep 2013 08:58:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-IF-Statement-syntax/m-p/535763#M481807</guid>
      <dc:creator />
      <dc:date>2013-09-18T08:58:34Z</dc:date>
    </item>
  </channel>
</rss>

