<?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: &amp;quot;If&amp;quot; with a variable in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/quot-If-quot-with-a-variable/m-p/378797#M141284</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;I understand your English just fine, but I am not sure I understand the expression you posted. You start with &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;if($(vSelectionGraph2)='Nombre de bénéficiaires', &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;which implies that vSelectionGraph2 is a string, but you end with &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Sum({...} $(vSelectionGraph2))))&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;which requires vSelectionGraph2 to be number. Is vSelectionGraph2 a field name? If that is so, then&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13452075766737184" jivemacro_uid="_13452075766737184"&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if('$(vSelectionGraph2)'='Nombre de bénéficiaires', &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(GetSelectedCount([Région du PS]) = 0 and GetSelectedCount([Département du PS]) = 0 and GetSelectedCount([Spécialité du PS]) &amp;gt; 0,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sum({$&amp;lt;[Type de fichier]={'2_F14'}&amp;gt;} NB_BEN),&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(GetSelectedCount([Région du PS]) &amp;gt;0 or GetSelectedCount([Département du PS]) &amp;gt;0 and GetSelectedCount([Spécialité du PS]) &amp;gt; 0,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sum({$&amp;lt;[Type de fichier]={'2_F03'}&amp;gt;} NB_BEN))), &lt;/P&gt;&lt;P&gt;if('$(vSelectionGraph2)'&amp;lt;&amp;gt;'Nombre de bénéficiaires',&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sum({$&amp;lt;[Type de fichier]={'3_F01'}&amp;gt;} $(=$(vSelectionGraph2)))))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;.. might do the trick. That corrects the compare problem (note the quotes around $(&lt;SPAN style="font-family: 'Lucida Grande', Arial, Helvetica, sans-serif; background-color: #ffffff;"&gt;vSelectionGraph2&lt;/SPAN&gt;)) and will evaluate $(&lt;SPAN style="font-family: 'Lucida Grande', Arial, Helvetica, sans-serif; background-color: #ffffff;"&gt;vSelectionGraph2&lt;/SPAN&gt;) as a field name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Actually, I think your second comparison is redundant. This is the same:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13452075766726778" jivemacro_uid="_13452075766726778"&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if('$(vSelectionGraph2)'='Nombre de bénéficiaires', &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(GetSelectedCount([Région du PS]) = 0 and GetSelectedCount([Département du PS]) = 0 and GetSelectedCount([Spécialité du PS]) &amp;gt; 0,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sum({$&amp;lt;[Type de fichier]={'2_F14'}&amp;gt;} NB_BEN),&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(GetSelectedCount([Région du PS]) &amp;gt;0 or GetSelectedCount([Département du PS]) &amp;gt;0 and GetSelectedCount([Spécialité du PS]) &amp;gt; 0,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sum({$&amp;lt;[Type de fichier]={'2_F03'}&amp;gt;} NB_BEN))), &lt;/P&gt;&lt;P&gt;sum({$&amp;lt;[Type de fichier]={'3_F01'}&amp;gt;} $(=$(vSelectionGraph2))))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 17 Aug 2012 12:45:56 GMT</pubDate>
    <dc:creator>jonathandienst</dc:creator>
    <dc:date>2012-08-17T12:45:56Z</dc:date>
    <item>
      <title>"If" with a variable</title>
      <link>https://community.qlik.com/t5/QlikView/quot-If-quot-with-a-variable/m-p/378790#M141277</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;I hope you will understand my problem, I don't speak english very well !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I work on Qlikview 10, and I don't understand how works variables in a "if". I have a input box with a list of indicator name stored in a variable as text ([Nombre de bénéficiaires];nombre d’actes;[Montant de la dépense]...) so that the user can change it to see what he wants. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In one of the graphics, I need to do something different if the indicator name is "[Nombre de bénéficiaires]", I tried this but it doesn't work :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13451959547276309" jivemacro_uid="_13451959547276309"&gt;&lt;P&gt;if($(vSelectionGraph2)='[Nombre de bénéficiaires]', if(GetSelectedCount([Région du PS]) = 0 and GetSelectedCount([Département du PS]) = 0 and GetSelectedCount([Spécialité du PS]) &amp;gt; 0,sum({$&amp;lt;[Type de fichier]={'2_F14'}&amp;gt;}NB_BEN),&lt;/P&gt;&lt;P&gt;if(GetSelectedCount([Région du PS]) &amp;gt;0 or GetSelectedCount([Département du PS]) &amp;gt;0 and GetSelectedCount([Spécialité du PS]) &amp;gt; 0,sum({$&amp;lt;[Type de fichier]={'2_F03'}&amp;gt;}NB_BEN))),&lt;/P&gt;&lt;P&gt;if($(vSelectionGraph2)&amp;lt;&amp;gt;'Nombre de bénéficiaires',sum({$&amp;lt;[Type de fichier]={'3_F01'}&amp;gt;}$(vSelectionGraph2))))&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It only works with the last part if (&lt;SPAN style="font-family: 'Lucida Grande', Arial, Helvetica, sans-serif; background-color: #ffffff;"&gt;$(vSelectionGraph2)&lt;/SPAN&gt;&amp;lt;&amp;gt;'&lt;SPAN style="font-family: 'Lucida Grande', Arial, Helvetica, sans-serif; background-color: #ffffff;"&gt;Nombre de bénéficiaires&lt;/SPAN&gt;'....), so I think that "&lt;SPAN style="font-family: 'Lucida Grande', Arial, Helvetica, sans-serif; background-color: #ffffff;"&gt;$(vSelectionGraph2)='[Nombre de bénéficiaires]&lt;/SPAN&gt;'" is the problem. But I don't understand why, I thought that $(variable) was replaced by the value, and in fact it seems to do that in the sum function at the end of my code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can someone help me ?&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>Fri, 17 Aug 2012 09:45:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/quot-If-quot-with-a-variable/m-p/378790#M141277</guid>
      <dc:creator />
      <dc:date>2012-08-17T09:45:26Z</dc:date>
    </item>
    <item>
      <title>Re: "If" with a variable</title>
      <link>https://community.qlik.com/t5/QlikView/quot-If-quot-with-a-variable/m-p/378791#M141278</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try removing the square brackets '[' around the actual text i.e., your expression should look like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Lucida Grande', Arial, Helvetica, sans-serif; background-color: #ffffff;"&gt;$(vSelectionGraph2)='Nombre de bénéficiaires&lt;/SPAN&gt;'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Aug 2012 11:08:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/quot-If-quot-with-a-variable/m-p/378791#M141278</guid>
      <dc:creator />
      <dc:date>2012-08-17T11:08:09Z</dc:date>
    </item>
    <item>
      <title>Re: "If" with a variable</title>
      <link>https://community.qlik.com/t5/QlikView/quot-If-quot-with-a-variable/m-p/378792#M141279</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tried it, this didn't change anything. But thank you for your answer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I really don't understand why Qlikview replace $(vSelectionGraph2) by the right value in the sum function but not in&amp;nbsp;&amp;nbsp; the if part.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Aug 2012 12:07:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/quot-If-quot-with-a-variable/m-p/378792#M141279</guid>
      <dc:creator />
      <dc:date>2012-08-17T12:07:11Z</dc:date>
    </item>
    <item>
      <title>Re: "If" with a variable</title>
      <link>https://community.qlik.com/t5/QlikView/quot-If-quot-with-a-variable/m-p/378793#M141280</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try removing the dollar sign expansion, just use variable name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Lucida Grande', Arial, Helvetica, sans-serif; background-color: #ffffff;"&gt;vSelectionGraph2='Nombre de bénéficiaires&lt;/SPAN&gt;'&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Aug 2012 12:22:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/quot-If-quot-with-a-variable/m-p/378793#M141280</guid>
      <dc:creator>jeremy_fourman</dc:creator>
      <dc:date>2012-08-17T12:22:53Z</dc:date>
    </item>
    <item>
      <title>Re: "If" with a variable</title>
      <link>https://community.qlik.com/t5/QlikView/quot-If-quot-with-a-variable/m-p/378794#M141281</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Actually I read the question wrong I thought you wanted to see this in a textbox.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would break your if down into small parts and see which piece actually doesn't work, starting at the beginning or the code you are asking about now, it may be a case where you are falling through the branches, the reason I say that is because of this statement &lt;/P&gt;&lt;P&gt; 'It only works with the last part if (&lt;SPAN style="font-family: 'Lucida Grande', Arial, Helvetica, sans-serif; background-color: #ffffff;"&gt;$(vSelectionGraph2)&lt;/SPAN&gt;&amp;lt;&amp;gt;'&lt;SPAN style="font-family: 'Lucida Grande', Arial, Helvetica, sans-serif; background-color: #ffffff;"&gt;Nombre de bénéficiaires&lt;/SPAN&gt;'....),'&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Aug 2012 12:26:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/quot-If-quot-with-a-variable/m-p/378794#M141281</guid>
      <dc:creator>jeremy_fourman</dc:creator>
      <dc:date>2012-08-17T12:26:44Z</dc:date>
    </item>
    <item>
      <title>Re: "If" with a variable</title>
      <link>https://community.qlik.com/t5/QlikView/quot-If-quot-with-a-variable/m-p/378795#M141282</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Puoi postare un esempio&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Aug 2012 12:32:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/quot-If-quot-with-a-variable/m-p/378795#M141282</guid>
      <dc:creator />
      <dc:date>2012-08-17T12:32:34Z</dc:date>
    </item>
    <item>
      <title>Re: "If" with a variable</title>
      <link>https://community.qlik.com/t5/QlikView/quot-If-quot-with-a-variable/m-p/378796#M141283</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sadly, it's still not working. &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/sad.png" /&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Aug 2012 12:34:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/quot-If-quot-with-a-variable/m-p/378796#M141283</guid>
      <dc:creator />
      <dc:date>2012-08-17T12:34:22Z</dc:date>
    </item>
    <item>
      <title>Re: "If" with a variable</title>
      <link>https://community.qlik.com/t5/QlikView/quot-If-quot-with-a-variable/m-p/378797#M141284</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;I understand your English just fine, but I am not sure I understand the expression you posted. You start with &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;if($(vSelectionGraph2)='Nombre de bénéficiaires', &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;which implies that vSelectionGraph2 is a string, but you end with &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Sum({...} $(vSelectionGraph2))))&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;which requires vSelectionGraph2 to be number. Is vSelectionGraph2 a field name? If that is so, then&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13452075766737184" jivemacro_uid="_13452075766737184"&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if('$(vSelectionGraph2)'='Nombre de bénéficiaires', &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(GetSelectedCount([Région du PS]) = 0 and GetSelectedCount([Département du PS]) = 0 and GetSelectedCount([Spécialité du PS]) &amp;gt; 0,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sum({$&amp;lt;[Type de fichier]={'2_F14'}&amp;gt;} NB_BEN),&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(GetSelectedCount([Région du PS]) &amp;gt;0 or GetSelectedCount([Département du PS]) &amp;gt;0 and GetSelectedCount([Spécialité du PS]) &amp;gt; 0,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sum({$&amp;lt;[Type de fichier]={'2_F03'}&amp;gt;} NB_BEN))), &lt;/P&gt;&lt;P&gt;if('$(vSelectionGraph2)'&amp;lt;&amp;gt;'Nombre de bénéficiaires',&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sum({$&amp;lt;[Type de fichier]={'3_F01'}&amp;gt;} $(=$(vSelectionGraph2)))))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;.. might do the trick. That corrects the compare problem (note the quotes around $(&lt;SPAN style="font-family: 'Lucida Grande', Arial, Helvetica, sans-serif; background-color: #ffffff;"&gt;vSelectionGraph2&lt;/SPAN&gt;)) and will evaluate $(&lt;SPAN style="font-family: 'Lucida Grande', Arial, Helvetica, sans-serif; background-color: #ffffff;"&gt;vSelectionGraph2&lt;/SPAN&gt;) as a field name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Actually, I think your second comparison is redundant. This is the same:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13452075766726778" jivemacro_uid="_13452075766726778"&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if('$(vSelectionGraph2)'='Nombre de bénéficiaires', &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(GetSelectedCount([Région du PS]) = 0 and GetSelectedCount([Département du PS]) = 0 and GetSelectedCount([Spécialité du PS]) &amp;gt; 0,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sum({$&amp;lt;[Type de fichier]={'2_F14'}&amp;gt;} NB_BEN),&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(GetSelectedCount([Région du PS]) &amp;gt;0 or GetSelectedCount([Département du PS]) &amp;gt;0 and GetSelectedCount([Spécialité du PS]) &amp;gt; 0,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sum({$&amp;lt;[Type de fichier]={'2_F03'}&amp;gt;} NB_BEN))), &lt;/P&gt;&lt;P&gt;sum({$&amp;lt;[Type de fichier]={'3_F01'}&amp;gt;} $(=$(vSelectionGraph2))))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Aug 2012 12:45:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/quot-If-quot-with-a-variable/m-p/378797#M141284</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2012-08-17T12:45:56Z</dc:date>
    </item>
    <item>
      <title>Re: "If" with a variable</title>
      <link>https://community.qlik.com/t5/QlikView/quot-If-quot-with-a-variable/m-p/378798#M141285</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;EM style="background-color: #ffffff; font-size: 12px; color: #636363; font-family: Arial;"&gt;vSelectionGraph2&lt;/EM&gt; is a text variable with the name of several indicators that the user will choose in a list in a input (for example number of patients,amount...). Then if that indicator is '&lt;CODE class="jive-code"&gt;Nombre de bénéficiaires&lt;/CODE&gt;' I have to pick the right value in a particular type of file.&lt;/P&gt;&lt;P&gt;Else, I go in another type of file and the name of the indicator is the same as the value of &lt;EM style="background-color: #ffffff; font-size: 12px; color: #636363; font-family: Arial;"&gt;&lt;EM style="background-color: #ffffff; font-size: 12px; color: #636363; font-family: Arial;"&gt;vSelectionGraph2&lt;/EM&gt; &lt;/EM&gt;. (if the user choose "amount" in the list, &lt;EM style="background-color: #ffffff; font-size: 12px; color: #636363; font-family: Arial;"&gt;&lt;EM style="background-color: #ffffff; font-size: 12px; color: #636363; font-family: Arial;"&gt;vSelectionGraph2&lt;/EM&gt; &lt;/EM&gt; = "amount", and the field with the value I need in my Qlikview QVD file is also "amount").&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And what your answered seems to be working, thank you so much ! &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/grin.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Aug 2012 13:28:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/quot-If-quot-with-a-variable/m-p/378798#M141285</guid>
      <dc:creator />
      <dc:date>2012-08-17T13:28:48Z</dc:date>
    </item>
  </channel>
</rss>

