<?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: How to creadte a condition triggering when 2 specific field values are active in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-creadte-a-condition-triggering-when-2-specific-field/m-p/1001036#M954885</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, index() returns array of 0s and 1s in this case. If the value (male/female) is found it returns 1 else 0. And the max() returns the maximum of them. I.e. - if the value is found max() returns 1 else 0 (out of all zeros). Hope this helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 17 Nov 2015 04:50:17 GMT</pubDate>
    <dc:creator>tresB</dc:creator>
    <dc:date>2015-11-17T04:50:17Z</dc:date>
    <item>
      <title>How to creadte a condition triggering when 2 specific field values are active</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-creadte-a-condition-triggering-when-2-specific-field/m-p/1001029#M954878</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 think this question is very basic and should be easy to solve. So far my googling did not lead me to a solution.&lt;/P&gt;&lt;P&gt;So at the moment i can not find the right syntax for the following problem.&lt;/P&gt;&lt;P&gt;I have a button and i want to show the button ONLY if two specific field values within a field are active.&lt;/P&gt;&lt;P&gt;It works for one value without problems.&lt;/P&gt;&lt;P&gt;E.g. if the "gender" "male" is selected within the field "gender" than i just apply the following condition on the button:&lt;/P&gt;&lt;P&gt;gender=("male")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now i want to display a button ONLY if BOTH female and male are active.&lt;/P&gt;&lt;P&gt;I thought this might work like in the following:&lt;/P&gt;&lt;P&gt;gender=("male") AND gender =("female") &amp;lt;= THIS DOES NOT WORK&lt;/P&gt;&lt;P&gt;I also tried out some other variants but can not figure out the right syntax.&lt;/P&gt;&lt;P&gt;Anyone can help me with this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Daniel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Nov 2015 10:42:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-creadte-a-condition-triggering-when-2-specific-field/m-p/1001029#M954878</guid>
      <dc:creator />
      <dc:date>2015-11-16T10:42:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to creadte a condition triggering when 2 specific field values are active</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-creadte-a-condition-triggering-when-2-specific-field/m-p/1001030#M954879</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Daniel,&lt;/P&gt;&lt;P&gt;This expression&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=WildMatch('|' &amp;amp;Concat(Distinct gender,'|') &amp;amp; '|', '*male*') * WildMatch('|' &amp;amp;Concat(Distinct gender,'|') &amp;amp; '|', '*female*')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;will return 1 only if &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;a/ 'male' and 'female' are selected&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;b/ No selections are made in the field 'gender', ie neither has been excluded.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you only want to show your button when both field values male and female have been selected combine the expression with this one:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=if(GetSelectedCount(gender)&amp;gt;0,1,0) which will return 1 only if selections have been made.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Andrew &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Nov 2015 11:08:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-creadte-a-condition-triggering-when-2-specific-field/m-p/1001030#M954879</guid>
      <dc:creator>effinty2112</dc:creator>
      <dc:date>2015-11-16T11:08:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to creadte a condition triggering when 2 specific field values are active</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-creadte-a-condition-triggering-when-2-specific-field/m-p/1001031#M954880</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;=Max(Index(gender, 'male')) and Max(Index(gender, 'female'))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;May be a bit simpler like: =Count(gender)&amp;gt;1&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Nov 2015 11:14:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-creadte-a-condition-triggering-when-2-specific-field/m-p/1001031#M954880</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2015-11-16T11:14:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to creadte a condition triggering when 2 specific field values are active</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-creadte-a-condition-triggering-when-2-specific-field/m-p/1001032#M954881</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Something like below,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=If(GetFieldSelections(gender,',')='female,male',1,0)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or Simply&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;=GetFieldSelections(gender,',')='female,male'&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Nov 2015 11:16:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-creadte-a-condition-triggering-when-2-specific-field/m-p/1001032#M954881</guid>
      <dc:creator>tamilarasu</dc:creator>
      <dc:date>2015-11-16T11:16:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to creadte a condition triggering when 2 specific field values are active</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-creadte-a-condition-triggering-when-2-specific-field/m-p/1001033#M954882</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Daniel,&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; A small but important correction to my post&lt;/P&gt;&lt;P&gt;The first expression should read &lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;=WildMatch('|' &amp;amp;Concat(Distinct gender,'|') &amp;amp; '|', '*|male|*') * WildMatch('|' &amp;amp;Concat(Distinct gender,'|') &amp;amp; '|', '*|female|*')&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Note the extra '|' characters around male and female. These are required because without them *male* would be a wildmatch even if only female was selected.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cheers&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Andrew&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Nov 2015 11:17:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-creadte-a-condition-triggering-when-2-specific-field/m-p/1001033#M954882</guid>
      <dc:creator>effinty2112</dc:creator>
      <dc:date>2015-11-16T11:17:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to creadte a condition triggering when 2 specific field values are active</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-creadte-a-condition-triggering-when-2-specific-field/m-p/1001034#M954883</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be try one of these:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=GetFieldSelections(gender) = 'female, male'&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To make sure this is working, first check the order of male and female in a text box object using the GetFieldSelections(gender) after you select female and male are selected in gender list box. The order will be important here because female, male &amp;lt;&amp;gt; male, female.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HTH&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Sunny&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Nov 2015 11:19:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-creadte-a-condition-triggering-when-2-specific-field/m-p/1001034#M954883</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-11-16T11:19:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to creadte a condition triggering when 2 specific field values are active</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-creadte-a-condition-triggering-when-2-specific-field/m-p/1001035#M954884</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear QV community,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thank you for all the helpful replies. I tried out the solution of &lt;SPAN class="j-post-author"&gt;&lt;STRONG&gt;&lt;A href="https://community.qlik.com/people/tresesco"&gt;tresesco&lt;/A&gt;&lt;/STRONG&gt;&lt;/SPAN&gt; and it imidiately worked.&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;=Max(Index(gender, 'male')) and Max(Index(gender, 'female'))&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Though, to be honest, i do not yet understand it 100%. I looked for the "index" function within the QV api (Automation Methods (?)) and could not find examples. So what does the index function do ( i guess it returns an array of values with 0 and 1(?) but why?)).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Daniel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Nov 2015 12:15:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-creadte-a-condition-triggering-when-2-specific-field/m-p/1001035#M954884</guid>
      <dc:creator />
      <dc:date>2015-11-16T12:15:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to creadte a condition triggering when 2 specific field values are active</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-creadte-a-condition-triggering-when-2-specific-field/m-p/1001036#M954885</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, index() returns array of 0s and 1s in this case. If the value (male/female) is found it returns 1 else 0. And the max() returns the maximum of them. I.e. - if the value is found max() returns 1 else 0 (out of all zeros). Hope this helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Nov 2015 04:50:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-creadte-a-condition-triggering-when-2-specific-field/m-p/1001036#M954885</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2015-11-17T04:50:17Z</dc:date>
    </item>
  </channel>
</rss>

