<?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 Multiple If Conditions in a variable with multiple selection criteria in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Multiple-If-Conditions-in-a-variable-with-multiple-selection/m-p/1649294#M48417</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm trying to make my app more "ergonomic" with the use of buttons and make the set analysis still "simple" (not to make the if in the set analysis and being redundant).&lt;/P&gt;&lt;P&gt;The first variable vSelectType can be 4 different values Jaune,Vert,Presta and All. Buttons will define the value of vSelectType.&lt;/P&gt;&lt;P&gt;Then in a second variable vType, i try to make a multiple if conditions that will change the selection criteria in my set analysis like :&lt;/P&gt;&lt;P&gt;if&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;(&lt;/FONT&gt;&lt;/STRONG&gt;$(vSelectType)='Jaune'&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;,&lt;/STRONG&gt;&lt;/FONT&gt;[Article Vte Famille]={'Bananes'}&lt;STRONG&gt;&lt;FONT color="#0000FF"&gt;,&lt;/FONT&gt;&lt;/STRONG&gt;[Fournisseur Lot Type]=-{'P'}&lt;STRONG&gt;&lt;FONT color="#0000FF"&gt;,&lt;/FONT&gt;&lt;/STRONG&gt;[Fact Ligne Couleur]={'Jaune'}&lt;STRONG&gt;&lt;FONT color="#0000FF"&gt;,&lt;/FONT&gt;&lt;/STRONG&gt;[Fact Type Vente]={'BANANES'}&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;,&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;if&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/FONT&gt;$(vSelectType)='Vert'&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;,&lt;/FONT&gt;&lt;/STRONG&gt;[Article Vte Famille]={'Bananes'}&lt;STRONG&gt;&lt;FONT color="#0000FF"&gt;,&lt;/FONT&gt;&lt;/STRONG&gt;[Fournisseur Lot Type]=-{'P'}&lt;STRONG&gt;&lt;FONT color="#0000FF"&gt;,&lt;/FONT&gt;&lt;/STRONG&gt;[Fact Ligne Couleur]={'Vert'}&lt;STRONG&gt;&lt;FONT color="#0000FF"&gt;,&lt;/FONT&gt;&lt;/STRONG&gt;[Fact Type Vente]={'BANANES'}&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;,&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;if&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;(&lt;/FONT&gt;&lt;/STRONG&gt;$(vSelectType)='Presta'&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;,&lt;/FONT&gt;&lt;/STRONG&gt;[Article Vte Famille]={'Bananes'}&lt;STRONG&gt;&lt;FONT color="#0000FF"&gt;,&lt;/FONT&gt;&lt;/STRONG&gt;[Fact Type Vente]=-{'BANANES'}&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;,&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;if&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;(&lt;/FONT&gt;&lt;/STRONG&gt;$(vSelectType)='All'&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;,&lt;/FONT&gt;&lt;/STRONG&gt;[Article Vte Famille]={'Bananes'}&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;))))&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;The set analysis is : sum({$&amp;lt;$(vType)&amp;gt;}[Marge Pds Net])&lt;/P&gt;&lt;P&gt;I think the problem is that Qlik think that the &lt;STRONG&gt;&lt;FONT color="#0000FF"&gt;,&lt;/FONT&gt;&lt;/STRONG&gt; is part of the if and isn't part of the string to replace, when vSelectType changes.&lt;/P&gt;&lt;P&gt;I tried :&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#339966"&gt;'&lt;/FONT&gt;&lt;/STRONG&gt;[Article Vte Famille]={'Ban&lt;FONT color="#000000"&gt;anes'},[Fournisseur Lot Type]=-{'P'},[Fact Ligne Couleur]={'Jaune'},[Fact&lt;/FONT&gt; Type Vente]={'BANANES'}&lt;STRONG&gt;&lt;FONT color="#339966"&gt;'&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#339966"&gt;"&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT color="#000000"&gt;[Article Vte Famille]={'Bananes'},[Fournisseur Lot Type]=-{'P'},[Fact Ligne Couleur]={'Jaune'},[Fact Type Vente]={'BANANES'}&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#339966"&gt;"&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#339966"&gt;text(&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT color="#000000"&gt;[Article Vte Famille]={'Bananes'},[Fournisseur Lot Type]=-{'P'},[Fact Ligne Couleur]={'Jaune'},[Fact Type Vente]={'BANANES'}&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#339966"&gt;)&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;It's not working&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;Anybody has a idea ?&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;Thank you,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;Max&lt;/FONT&gt;&lt;/P&gt;</description>
    <pubDate>Sat, 16 Nov 2024 04:03:52 GMT</pubDate>
    <dc:creator>MaxCld</dc:creator>
    <dc:date>2024-11-16T04:03:52Z</dc:date>
    <item>
      <title>Multiple If Conditions in a variable with multiple selection criteria</title>
      <link>https://community.qlik.com/t5/App-Development/Multiple-If-Conditions-in-a-variable-with-multiple-selection/m-p/1649294#M48417</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm trying to make my app more "ergonomic" with the use of buttons and make the set analysis still "simple" (not to make the if in the set analysis and being redundant).&lt;/P&gt;&lt;P&gt;The first variable vSelectType can be 4 different values Jaune,Vert,Presta and All. Buttons will define the value of vSelectType.&lt;/P&gt;&lt;P&gt;Then in a second variable vType, i try to make a multiple if conditions that will change the selection criteria in my set analysis like :&lt;/P&gt;&lt;P&gt;if&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;(&lt;/FONT&gt;&lt;/STRONG&gt;$(vSelectType)='Jaune'&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;,&lt;/STRONG&gt;&lt;/FONT&gt;[Article Vte Famille]={'Bananes'}&lt;STRONG&gt;&lt;FONT color="#0000FF"&gt;,&lt;/FONT&gt;&lt;/STRONG&gt;[Fournisseur Lot Type]=-{'P'}&lt;STRONG&gt;&lt;FONT color="#0000FF"&gt;,&lt;/FONT&gt;&lt;/STRONG&gt;[Fact Ligne Couleur]={'Jaune'}&lt;STRONG&gt;&lt;FONT color="#0000FF"&gt;,&lt;/FONT&gt;&lt;/STRONG&gt;[Fact Type Vente]={'BANANES'}&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;,&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;if&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/FONT&gt;$(vSelectType)='Vert'&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;,&lt;/FONT&gt;&lt;/STRONG&gt;[Article Vte Famille]={'Bananes'}&lt;STRONG&gt;&lt;FONT color="#0000FF"&gt;,&lt;/FONT&gt;&lt;/STRONG&gt;[Fournisseur Lot Type]=-{'P'}&lt;STRONG&gt;&lt;FONT color="#0000FF"&gt;,&lt;/FONT&gt;&lt;/STRONG&gt;[Fact Ligne Couleur]={'Vert'}&lt;STRONG&gt;&lt;FONT color="#0000FF"&gt;,&lt;/FONT&gt;&lt;/STRONG&gt;[Fact Type Vente]={'BANANES'}&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;,&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;if&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;(&lt;/FONT&gt;&lt;/STRONG&gt;$(vSelectType)='Presta'&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;,&lt;/FONT&gt;&lt;/STRONG&gt;[Article Vte Famille]={'Bananes'}&lt;STRONG&gt;&lt;FONT color="#0000FF"&gt;,&lt;/FONT&gt;&lt;/STRONG&gt;[Fact Type Vente]=-{'BANANES'}&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;,&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;if&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;(&lt;/FONT&gt;&lt;/STRONG&gt;$(vSelectType)='All'&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;,&lt;/FONT&gt;&lt;/STRONG&gt;[Article Vte Famille]={'Bananes'}&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;))))&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;The set analysis is : sum({$&amp;lt;$(vType)&amp;gt;}[Marge Pds Net])&lt;/P&gt;&lt;P&gt;I think the problem is that Qlik think that the &lt;STRONG&gt;&lt;FONT color="#0000FF"&gt;,&lt;/FONT&gt;&lt;/STRONG&gt; is part of the if and isn't part of the string to replace, when vSelectType changes.&lt;/P&gt;&lt;P&gt;I tried :&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#339966"&gt;'&lt;/FONT&gt;&lt;/STRONG&gt;[Article Vte Famille]={'Ban&lt;FONT color="#000000"&gt;anes'},[Fournisseur Lot Type]=-{'P'},[Fact Ligne Couleur]={'Jaune'},[Fact&lt;/FONT&gt; Type Vente]={'BANANES'}&lt;STRONG&gt;&lt;FONT color="#339966"&gt;'&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#339966"&gt;"&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT color="#000000"&gt;[Article Vte Famille]={'Bananes'},[Fournisseur Lot Type]=-{'P'},[Fact Ligne Couleur]={'Jaune'},[Fact Type Vente]={'BANANES'}&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#339966"&gt;"&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#339966"&gt;text(&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT color="#000000"&gt;[Article Vte Famille]={'Bananes'},[Fournisseur Lot Type]=-{'P'},[Fact Ligne Couleur]={'Jaune'},[Fact Type Vente]={'BANANES'}&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#339966"&gt;)&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;It's not working&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;Anybody has a idea ?&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;Thank you,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;Max&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 04:03:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Multiple-If-Conditions-in-a-variable-with-multiple-selection/m-p/1649294#M48417</guid>
      <dc:creator>MaxCld</dc:creator>
      <dc:date>2024-11-16T04:03:52Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple If Conditions in a variable with multiple selection criteria</title>
      <link>https://community.qlik.com/t5/App-Development/Multiple-If-Conditions-in-a-variable-with-multiple-selection/m-p/1649306#M48418</link>
      <description>&lt;P&gt;Have you tried&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;sum({$&amp;lt;$(=vType)&amp;gt;}[Marge Pds Net])&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;OR&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;sum({$&amp;lt;'$(=vType)'&amp;gt;}[Marge Pds Net])&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;It will be easier to help if you could create a sample app where you have some sample data and your variables and expressions. &lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Nov 2019 17:47:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Multiple-If-Conditions-in-a-variable-with-multiple-selection/m-p/1649306#M48418</guid>
      <dc:creator>Vegar</dc:creator>
      <dc:date>2019-11-20T17:47:17Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple If Conditions in a variable with multiple selection criteria</title>
      <link>https://community.qlik.com/t5/App-Development/Multiple-If-Conditions-in-a-variable-with-multiple-selection/m-p/1649325#M48419</link>
      <description>&lt;P&gt;May be try this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;If(vSelectType = 'Jaune', '[Article Vte Famille] = {[Bananes]}, [Fournisseur Lot Type] =- {[P]}, [Fact Ligne Couleur] = {[Jaune]}, [Fact Type Vente] = {[BANANES]}',
If(vSelectType = 'Vert', '[Article Vte Famille] = {[Bananes]}, [Fournisseur Lot Type] =- {[P]}, [Fact Ligne Couleur] = {[Vert]}, [Fact Type Vente] = {[BANANES]}',
If(vSelectType = 'Presta', '[Article Vte Famille] = {[Bananes]}, [Fact Type Vente] =- {[BANANES]}',
If(vSelectType = 'All', '[Article Vte Famille] = {[Bananes]}'))))&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 20 Nov 2019 18:44:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Multiple-If-Conditions-in-a-variable-with-multiple-selection/m-p/1649325#M48419</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2019-11-20T18:44:23Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple If Conditions in a variable with multiple selection criteria</title>
      <link>https://community.qlik.com/t5/App-Development/Multiple-If-Conditions-in-a-variable-with-multiple-selection/m-p/1649470#M48433</link>
      <description>&lt;P&gt;Hi Sunny_Talwar,&lt;/P&gt;&lt;P&gt;Thank you for your answer,&lt;/P&gt;&lt;P&gt;I removed the $() in the if(vSelectType='Jaune', etc... and put [] around criteria and the if variable is now working !&lt;/P&gt;&lt;P&gt;But I still have problem with the synthax of the primary set analysis :&amp;nbsp;&lt;SPAN&gt;sum({$&amp;lt;$(vType)&amp;gt;}[Marge Pds Net])&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I already tried with the new if :&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;sum({$&amp;lt;$(vType)&amp;gt;}[Marge Pds Net])&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;sum({$&amp;lt;'$(vType)'&amp;gt;}[Marge Pds Net])&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;sum({$&amp;lt;'$(=vType)'&amp;gt;}[Marge Pds Net])&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;sum({$&amp;lt;$(=vType)&amp;gt;}[Marge Pds Net])&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Not working&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Nov 2019 11:36:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Multiple-If-Conditions-in-a-variable-with-multiple-selection/m-p/1649470#M48433</guid>
      <dc:creator>MaxCld</dc:creator>
      <dc:date>2019-11-21T11:36:58Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple If Conditions in a variable with multiple selection criteria</title>
      <link>https://community.qlik.com/t5/App-Development/Multiple-If-Conditions-in-a-variable-with-multiple-selection/m-p/1649471#M48434</link>
      <description>&lt;P&gt;Hi Vegar,&lt;/P&gt;&lt;P&gt;I tried with the new if of&amp;nbsp;&lt;SPAN&gt;Sunny_Talwar&lt;/SPAN&gt; :&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;sum({$&amp;lt;$(vType)&amp;gt;}[Marge Pds Net])&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;sum({$&amp;lt;'$(vType)'&amp;gt;}[Marge Pds Net])&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;sum({$&amp;lt;'$(=vType)'&amp;gt;}[Marge Pds Net])&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;sum({$&amp;lt;$(=vType)&amp;gt;}[Marge Pds Net])&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Not working&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Nov 2019 08:48:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Multiple-If-Conditions-in-a-variable-with-multiple-selection/m-p/1649471#M48434</guid>
      <dc:creator>MaxCld</dc:creator>
      <dc:date>2019-11-21T08:48:15Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple If Conditions in a variable with multiple selection criteria</title>
      <link>https://community.qlik.com/t5/App-Development/Multiple-If-Conditions-in-a-variable-with-multiple-selection/m-p/1649568#M48448</link>
      <description>&lt;P&gt;Can you try this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Sum({$&amp;lt;$(=$(vType))&amp;gt;} [Marge Pds Net])&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Nov 2019 12:00:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Multiple-If-Conditions-in-a-variable-with-multiple-selection/m-p/1649568#M48448</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2019-11-21T12:00:53Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple If Conditions in a variable with multiple selection criteria</title>
      <link>https://community.qlik.com/t5/App-Development/Multiple-If-Conditions-in-a-variable-with-multiple-selection/m-p/1649574#M48449</link>
      <description>&lt;P&gt;It's working perfectly thank you !!&lt;/P&gt;</description>
      <pubDate>Thu, 21 Nov 2019 12:10:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Multiple-If-Conditions-in-a-variable-with-multiple-selection/m-p/1649574#M48449</guid>
      <dc:creator>MaxCld</dc:creator>
      <dc:date>2019-11-21T12:10:30Z</dc:date>
    </item>
  </channel>
</rss>

