<?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: 'if' statement in set analysis in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/if-statement-in-set-analysis/m-p/667178#M474535</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try sth like:&lt;/P&gt;&lt;P&gt;sum({$&amp;lt;[Condition]={$(=if(SubStringCount([Condition],'a') or SubStringCount([Condition],'b') or SubStringCount([Condition],'c'),chr(39)&amp;amp;'a'&amp;amp;chr(39)&amp;amp;','&amp;amp;chr(39)&amp;amp;'b'&amp;amp;chr(39)&amp;amp;','&amp;amp;chr(39)&amp;amp;'c'&amp;amp;chr(39),&lt;/P&gt;&lt;P&gt;chr(39)&amp;amp;'d'&amp;amp;chr(39)&amp;amp;','&amp;amp;chr(39)&amp;amp;'e'&amp;amp;chr(39)&amp;amp;','&amp;amp;chr(39)&amp;amp;'f'&amp;amp;chr(39)))}&amp;gt;}&lt;/P&gt;&lt;P&gt;[Field to sum])&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 10 Sep 2014 14:10:09 GMT</pubDate>
    <dc:creator>karolina_</dc:creator>
    <dc:date>2014-09-10T14:10:09Z</dc:date>
    <item>
      <title>'if' statement in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/if-statement-in-set-analysis/m-p/667177#M474534</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to work out an 'if' statement such that when one selection is made for a geography, certain values will be returned.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Lets say that we have a selection box with Geographies a,b,c,d,e,f,g.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So when a,b,or c are selected (only one can be chosen at a time), than a,b and c are all returned in my chart.&amp;nbsp; This would be the same for d,e,f,g.&lt;/P&gt;&lt;P&gt;An example: we select 'b', then we see a,b,c.&lt;/P&gt;&lt;P&gt;Another example: we select 'g', then we see d,e,f,g in the chart&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I know that this can be done as a conditional in the 'dimensions' tab.&amp;nbsp; I am struggling with the syntax, though.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank You,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Sep 2014 12:23:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-statement-in-set-analysis/m-p/667177#M474534</guid>
      <dc:creator />
      <dc:date>2014-09-10T12:23:10Z</dc:date>
    </item>
    <item>
      <title>Re: 'if' statement in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/if-statement-in-set-analysis/m-p/667178#M474535</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try sth like:&lt;/P&gt;&lt;P&gt;sum({$&amp;lt;[Condition]={$(=if(SubStringCount([Condition],'a') or SubStringCount([Condition],'b') or SubStringCount([Condition],'c'),chr(39)&amp;amp;'a'&amp;amp;chr(39)&amp;amp;','&amp;amp;chr(39)&amp;amp;'b'&amp;amp;chr(39)&amp;amp;','&amp;amp;chr(39)&amp;amp;'c'&amp;amp;chr(39),&lt;/P&gt;&lt;P&gt;chr(39)&amp;amp;'d'&amp;amp;chr(39)&amp;amp;','&amp;amp;chr(39)&amp;amp;'e'&amp;amp;chr(39)&amp;amp;','&amp;amp;chr(39)&amp;amp;'f'&amp;amp;chr(39)))}&amp;gt;}&lt;/P&gt;&lt;P&gt;[Field to sum])&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Sep 2014 14:10:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-statement-in-set-analysis/m-p/667178#M474535</guid>
      <dc:creator>karolina_</dc:creator>
      <dc:date>2014-09-10T14:10:09Z</dc:date>
    </item>
    <item>
      <title>Re: 'if' statement in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/if-statement-in-set-analysis/m-p/667179#M474536</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;This was helpful. But is there a way to reduce the syntax.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;What I am trying to say is:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;When select value in ('a' or 'b' or 'c') then 'a,b,c'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;When selected value in ('d'&lt;SPAN style="font-size: 13.63636302948px;"&gt; or &lt;/SPAN&gt;'e'&lt;SPAN style="font-size: 13.63636302948px;"&gt; or &lt;/SPAN&gt;'f'&lt;SPAN style="font-size: 13.63636302948px;"&gt; or &lt;/SPAN&gt;'g') then 'd,e,f,g'&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Sep 2014 17:26:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-statement-in-set-analysis/m-p/667179#M474536</guid>
      <dc:creator />
      <dc:date>2014-09-10T17:26:41Z</dc:date>
    </item>
    <item>
      <title>Re: 'if' statement in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/if-statement-in-set-analysis/m-p/667180#M474537</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The syntax is that long because you need to have {'a','b','c'} not 'a,b,c'.&lt;BR /&gt;Each value must be quoted and you cannot write in that inside if statement ''a','b','c''&lt;BR /&gt;Replacing ' with chr(39) will work fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At least I cannot think of shorter version now, hope somebody will help &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Sep 2014 18:33:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-statement-in-set-analysis/m-p/667180#M474537</guid>
      <dc:creator>karolina_</dc:creator>
      <dc:date>2014-09-10T18:33:59Z</dc:date>
    </item>
  </channel>
</rss>

