<?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 Pass multiple values using if statement in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Pass-multiple-values-using-if-statement/m-p/1516292#M750552</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I need to pass multiple values using if statement in QV front-end expression dynamically.&lt;/P&gt;&lt;P&gt;For example,&amp;nbsp;&lt;/P&gt;&lt;P&gt;=if(Customer = 'A' and Customer = 'B' and Customer = 'C' ,1,0)&lt;/P&gt;&lt;P&gt;I need the above expression dynamically using a variable. Is it possible? If it is, please help.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=if(Customer = $(vCustomer), 1,0)&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;--&amp;nbsp; I tried this but no use.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;vCustomer = GetFieldSelections(Customer)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I also tried &lt;STRONG&gt;"Match"&lt;/STRONG&gt; function, but I couldn't achieve &lt;STRONG&gt;"AND"&amp;nbsp;&lt;/STRONG&gt;operation in if statement since match function satisfies the condition if any one of the values is present.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Attached my sample QVW with this.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;</description>
    <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2020-11-25T16:16:04Z</dc:date>
    <item>
      <title>Pass multiple values using if statement</title>
      <link>https://community.qlik.com/t5/QlikView/Pass-multiple-values-using-if-statement/m-p/1516292#M750552</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I need to pass multiple values using if statement in QV front-end expression dynamically.&lt;/P&gt;&lt;P&gt;For example,&amp;nbsp;&lt;/P&gt;&lt;P&gt;=if(Customer = 'A' and Customer = 'B' and Customer = 'C' ,1,0)&lt;/P&gt;&lt;P&gt;I need the above expression dynamically using a variable. Is it possible? If it is, please help.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=if(Customer = $(vCustomer), 1,0)&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;--&amp;nbsp; I tried this but no use.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;vCustomer = GetFieldSelections(Customer)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I also tried &lt;STRONG&gt;"Match"&lt;/STRONG&gt; function, but I couldn't achieve &lt;STRONG&gt;"AND"&amp;nbsp;&lt;/STRONG&gt;operation in if statement since match function satisfies the condition if any one of the values is present.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Attached my sample QVW with this.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Pass-multiple-values-using-if-statement/m-p/1516292#M750552</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Pass multiple values using if statement</title>
      <link>https://community.qlik.com/t5/QlikView/Pass-multiple-values-using-if-statement/m-p/1516301#M750553</link>
      <description>&lt;P&gt;Your expression and match() both work fine.&lt;BR /&gt;You need to change your total expression from "Total Count" to "Sum of Rows" to get the correct total.&amp;nbsp;See attached.&lt;/P&gt;</description>
      <pubDate>Tue, 04 Dec 2018 14:58:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Pass-multiple-values-using-if-statement/m-p/1516301#M750553</guid>
      <dc:creator>Colin-Albert</dc:creator>
      <dc:date>2018-12-04T14:58:01Z</dc:date>
    </item>
    <item>
      <title>Re: Pass multiple values using if statement</title>
      <link>https://community.qlik.com/t5/QlikView/Pass-multiple-values-using-if-statement/m-p/1516313#M750554</link>
      <description>&lt;P&gt;Another expression that will work is&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=count(if(match(Customer, 'A','B','C'), 1))&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;and set the Total mode to "Expression Default"&lt;/P&gt;</description>
      <pubDate>Tue, 04 Dec 2018 15:19:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Pass-multiple-values-using-if-statement/m-p/1516313#M750554</guid>
      <dc:creator>Colin-Albert</dc:creator>
      <dc:date>2018-12-04T15:19:12Z</dc:date>
    </item>
    <item>
      <title>Re: Pass multiple values using if statement</title>
      <link>https://community.qlik.com/t5/QlikView/Pass-multiple-values-using-if-statement/m-p/1516341#M750555</link>
      <description>&lt;P&gt;Thanks Colin. But I expect creating a variable and using it in the &lt;STRONG&gt;expression&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;This match function works only for "OR" operation not for "AND" operation,&lt;/P&gt;&lt;P&gt;=if(Customer='A'&amp;nbsp;&lt;STRONG&gt;and&lt;/STRONG&gt; Customer='B'&amp;nbsp;&lt;STRONG&gt;and&lt;/STRONG&gt; Customer='C',1,0).&lt;/P&gt;&lt;P&gt;also this&amp;nbsp;expression is static but I want it as a dynamic one, please suggest.&lt;/P&gt;</description>
      <pubDate>Tue, 04 Dec 2018 15:54:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Pass-multiple-values-using-if-statement/m-p/1516341#M750555</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-12-04T15:54:03Z</dc:date>
    </item>
    <item>
      <title>Re: Pass multiple values using if statement</title>
      <link>https://community.qlik.com/t5/QlikView/Pass-multiple-values-using-if-statement/m-p/1516354#M750556</link>
      <description>&lt;P&gt;&lt;SPAN&gt;=if(Customer='A'&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;and&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;Customer='B'&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;and&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;Customer='C',1,0) will never work, as a customer cannot be A, B and C at the same time.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I think you have your a ANDs and ORs mixed up,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;or perhaps you have not explained your requirements.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Can you show some example data for Customer and the expected results?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Dec 2018 16:05:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Pass-multiple-values-using-if-statement/m-p/1516354#M750556</guid>
      <dc:creator>Colin-Albert</dc:creator>
      <dc:date>2018-12-04T16:05:14Z</dc:date>
    </item>
    <item>
      <title>Re: Pass multiple values using if statement</title>
      <link>https://community.qlik.com/t5/QlikView/Pass-multiple-values-using-if-statement/m-p/1516411#M750557</link>
      <description>&lt;P&gt;Provided my requirements below.&lt;/P&gt;&lt;P&gt;1. Assume we have 4 customers (A, B, C &amp;amp; D)&amp;nbsp;and each customer has its own fields and logics as mentioned below.&lt;/P&gt;&lt;P&gt;Customer&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Field&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Logic&lt;/P&gt;&lt;P&gt;A&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; AB&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;A11&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A&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; AC&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;B12&lt;/P&gt;&lt;P&gt;A&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; AD&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;D34&lt;/P&gt;&lt;P&gt;B&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; AC&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;J76&lt;/P&gt;&lt;P&gt;B&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; AE&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;E90&lt;/P&gt;&lt;P&gt;B&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; AD&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;F34&lt;/P&gt;&lt;P&gt;B&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; AO&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; I87&lt;/P&gt;&lt;P&gt;C&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; AB&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;G23&lt;/P&gt;&lt;P&gt;C&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; CD&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;K45&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;D&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; BO&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; A17&lt;/P&gt;&lt;P&gt;D&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; AC&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;C09&lt;/P&gt;&lt;P&gt;D&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; CD&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; V89&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now, if a customer is selected (assume Customer A is selected). I need the below mentioned things.&lt;/P&gt;&lt;P&gt;1. Total Number of fields for the selected customer (3).&lt;/P&gt;&lt;P&gt;2. Reusable fields count matching exactly same with the other customers (excluding selected customer) ,&lt;/P&gt;&lt;P&gt;(2 fields of A exactly matches with fields of B, similarly 1 field matches with C and D).&lt;/P&gt;&lt;P&gt;3. Here is the critical part - Assume if we select the reusable fields count (2 matching fields from customer B), I want totally 3 fields in&amp;nbsp;a table&amp;nbsp;as shown below (since 3 is the total no. of fields of customer A).&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Field&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Logic&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;AB&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;A11&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;--&amp;nbsp; Not matched&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;AC&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;J76&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-- Matched&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;AD&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;F34&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;-- Matched&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;In the above table, Field AB from customer A is not used in customer B. So the logic should be A's logic (A11).&lt;/P&gt;&lt;P&gt;But the other fields AC and AD&lt;SPAN&gt;&amp;nbsp;from customer A are used in customer B. So the logic should be B's logic (J76 and F34).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Note: The fields are same, only difference is Logic.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;This is where my problem if we multi-select reusable fields of both B and C (from point 3) - I need to show both matching and unmatching fields. This is why I'm looking for a dynamic expression.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Dec 2018 17:31:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Pass-multiple-values-using-if-statement/m-p/1516411#M750557</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-12-04T17:31:22Z</dc:date>
    </item>
  </channel>
</rss>

