<?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 IF in set identifier in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/IF-in-set-identifier/m-p/281460#M496094</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Why not create a second variable (let's call it vVariableCountExp):&lt;/P&gt;&lt;P&gt;=&lt;SPAN style="color: #3366ff;"&gt;If&lt;/SPAN&gt;( &lt;SPAN style="color: #3366ff;"&gt;IsNull&lt;/SPAN&gt;( &lt;SPAN style="color: #c0c0c0;"&gt;&lt;EM&gt;$(vVariable_1)&lt;/EM&gt;&lt;/SPAN&gt; ),'"*"',&lt;EM style="color: #c0c0c0;"&gt;$(vVariable_1))&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and then use vVariableCountExp in your set element:&lt;/P&gt;&lt;P&gt;= &lt;SPAN style="color: #3366ff;"&gt;count&lt;SPAN style="color: #000000;"&gt;(&lt;/SPAN&gt;&lt;/SPAN&gt;{$&amp;lt; &lt;SPAN style="color: #993366;"&gt;Field_1&lt;/SPAN&gt; = {$(vVariableCountExp)} &amp;gt;} &lt;SPAN style="color: #993366;"&gt;Field_2&lt;/SPAN&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't think that you can use an if-conditon in the set element directly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 14 Feb 2012 17:27:19 GMT</pubDate>
    <dc:creator>swuehl</dc:creator>
    <dc:date>2012-02-14T17:27:19Z</dc:date>
    <item>
      <title>IF in set identifier</title>
      <link>https://community.qlik.com/t5/QlikView/IF-in-set-identifier/m-p/281459#M496093</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello The Community,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So far, the community has answered all my question before asking, but now I'm stuck. So I hope you guys will help me &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's the thing:&lt;/P&gt;&lt;P&gt;I am deseperatly trying to include an "IF" in a set identifer, but none of what I tried so far worked.&lt;/P&gt;&lt;P&gt;I am trying to count the number of existing Field_2 where Field_1 = vVariable_1, but if vVariable_1 is null, then I must count all the Field_2.&lt;/P&gt;&lt;P&gt;here is an example:&lt;/P&gt;&lt;P&gt;= &lt;SPAN style="color: #3366ff;"&gt;count&lt;SPAN style="color: #000000;"&gt;(&lt;/SPAN&gt;&lt;/SPAN&gt;{$&amp;lt; &lt;SPAN style="color: #993366;"&gt;Field_1&lt;/SPAN&gt; = &lt;SPAN style="color: #3366ff;"&gt;If&lt;/SPAN&gt;( &lt;SPAN style="color: #3366ff;"&gt;IsNull&lt;/SPAN&gt;( &lt;SPAN style="color: #c0c0c0;"&gt;&lt;EM&gt;$(vVariable_1)&lt;/EM&gt;&lt;/SPAN&gt; ),'{*}',&lt;EM style="color: #c0c0c0;"&gt;$(vVariable_1)&lt;/EM&gt;)&amp;gt;} &lt;SPAN style="color: #993366;"&gt;Field_2&lt;/SPAN&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope I made myself clear enough you would help me out.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Feb 2012 16:19:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/IF-in-set-identifier/m-p/281459#M496093</guid>
      <dc:creator />
      <dc:date>2012-02-14T16:19:19Z</dc:date>
    </item>
    <item>
      <title>IF in set identifier</title>
      <link>https://community.qlik.com/t5/QlikView/IF-in-set-identifier/m-p/281460#M496094</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Why not create a second variable (let's call it vVariableCountExp):&lt;/P&gt;&lt;P&gt;=&lt;SPAN style="color: #3366ff;"&gt;If&lt;/SPAN&gt;( &lt;SPAN style="color: #3366ff;"&gt;IsNull&lt;/SPAN&gt;( &lt;SPAN style="color: #c0c0c0;"&gt;&lt;EM&gt;$(vVariable_1)&lt;/EM&gt;&lt;/SPAN&gt; ),'"*"',&lt;EM style="color: #c0c0c0;"&gt;$(vVariable_1))&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and then use vVariableCountExp in your set element:&lt;/P&gt;&lt;P&gt;= &lt;SPAN style="color: #3366ff;"&gt;count&lt;SPAN style="color: #000000;"&gt;(&lt;/SPAN&gt;&lt;/SPAN&gt;{$&amp;lt; &lt;SPAN style="color: #993366;"&gt;Field_1&lt;/SPAN&gt; = {$(vVariableCountExp)} &amp;gt;} &lt;SPAN style="color: #993366;"&gt;Field_2&lt;/SPAN&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't think that you can use an if-conditon in the set element directly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Feb 2012 17:27:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/IF-in-set-identifier/m-p/281460#M496094</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-02-14T17:27:19Z</dc:date>
    </item>
    <item>
      <title>IF in set identifier</title>
      <link>https://community.qlik.com/t5/QlikView/IF-in-set-identifier/m-p/281461#M496095</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;Can you try like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3366ff;"&gt;If&lt;/SPAN&gt;( &lt;SPAN style="color: #3366ff;"&gt;IsNull&lt;/SPAN&gt;( &lt;SPAN style="color: #c0c0c0;"&gt;&lt;EM&gt;$(vVariable_1)&lt;/EM&gt;&lt;/SPAN&gt; ),&amp;nbsp; &lt;SPAN style="color: #3366ff;"&gt;count&lt;SPAN style="color: #000000;"&gt;(&lt;/SPAN&gt;&lt;/SPAN&gt;{$&amp;lt; &lt;SPAN style="color: #993366;"&gt;Field_1&lt;/SPAN&gt; = {'*'}&amp;gt;} &lt;SPAN style="color: #993366;"&gt;Field_2),&lt;/SPAN&gt;&lt;SPAN style="color: #993366;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3366ff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; count&lt;SPAN style="color: #000000;"&gt;(&lt;/SPAN&gt;&lt;/SPAN&gt;{$&amp;lt; &lt;SPAN style="color: #993366;"&gt;Field_1&lt;/SPAN&gt; = {&lt;EM style="color: #c0c0c0;"&gt;$(vVariable_1)&lt;/EM&gt;}&amp;gt;} &lt;SPAN style="color: #993366;"&gt;Field_2))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #993366;"&gt;Hope this helps you.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #993366;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #993366;"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #993366;"&gt;Jagan.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Feb 2012 05:42:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/IF-in-set-identifier/m-p/281461#M496095</guid>
      <dc:creator>jagan</dc:creator>
      <dc:date>2012-02-15T05:42:34Z</dc:date>
    </item>
    <item>
      <title>IF in set identifier</title>
      <link>https://community.qlik.com/t5/QlikView/IF-in-set-identifier/m-p/281462#M496097</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Okay that works for one.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But in fact, I have 4 différent Fields to set.&lt;/P&gt;&lt;P&gt;Like Count({$&amp;lt;Field_1 = X1, Field_2 = X2, Field_3 = X3, Field_4 = X4&amp;gt;} Field_5)&lt;/P&gt;&lt;P&gt;And for each one I have to select either the Value of Xn or *.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It would mean to many imbricated to many different if, to assure all possible solution.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Feb 2012 11:10:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/IF-in-set-identifier/m-p/281462#M496097</guid>
      <dc:creator />
      <dc:date>2012-02-15T11:10:28Z</dc:date>
    </item>
  </channel>
</rss>

