<?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 find a matching value in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-find-a-matching-value/m-p/831845#M292712</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;so what exactly are you trying to accomplish? you have a table rooms and want to see if Room1,Room2 ... RoomN are available in the table?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 14 Apr 2015 14:32:26 GMT</pubDate>
    <dc:creator>maleksafa</dc:creator>
    <dc:date>2015-04-14T14:32:26Z</dc:date>
    <item>
      <title>How to find a matching value</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-find-a-matching-value/m-p/831844#M292711</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a very simple question. How to find whether a column includes a specific value? I have writtem expressions and script in QlikView. In QlikView, there is no straightforward way to program simple expressions. Any assistance will be appreciated.&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="WIDTH: 64px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl63" height="20" style="TEXT-ALIGN: center;" width="64"&gt;&lt;STRONG&gt;Rooms&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="20" style="TEXT-ALIGN: center; BORDER-TOP: medium none;"&gt;Room1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="20" style="TEXT-ALIGN: center; BORDER-TOP: medium none;"&gt;Room2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="20" style="TEXT-ALIGN: center; BORDER-TOP: medium none;"&gt;Room3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="20" style="TEXT-ALIGN: center; BORDER-TOP: medium none;"&gt;Room4&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="20" style="TEXT-ALIGN: center; BORDER-TOP: medium none;"&gt;Room2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="20" style="TEXT-ALIGN: center; BORDER-TOP: medium none;"&gt;Room3&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to write a script or in an expression that verifies whether a column contains a specific value.&lt;/P&gt;&lt;P&gt;=if(Rooms='Room1',True,False)&lt;/P&gt;&lt;P&gt;=If(Rooms='Room2',1,0)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am able to use the Count function to count the number of times "Room2" is included in Column "Rooms. But unable to match the column value. I tried Aggr, Sum functions. I have also written macros in Excel and familiar with other programning languages.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;R&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Apr 2015 14:29:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-find-a-matching-value/m-p/831844#M292711</guid>
      <dc:creator />
      <dc:date>2015-04-14T14:29:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to find a matching value</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-find-a-matching-value/m-p/831845#M292712</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;so what exactly are you trying to accomplish? you have a table rooms and want to see if Room1,Room2 ... RoomN are available in the table?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Apr 2015 14:32:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-find-a-matching-value/m-p/831845#M292712</guid>
      <dc:creator>maleksafa</dc:creator>
      <dc:date>2015-04-14T14:32:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to find a matching value</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-find-a-matching-value/m-p/831846#M292713</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Malek,&lt;/P&gt;&lt;P&gt;That is correct. The table "Rooms" is derived from another expression.I want to find out whether "Rooms" column includes "Room1".&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Apr 2015 14:41:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-find-a-matching-value/m-p/831846#M292713</guid>
      <dc:creator />
      <dc:date>2015-04-14T14:41:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to find a matching value</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-find-a-matching-value/m-p/831847#M292714</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;For script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let vCheck='Room2';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD * Inline [&lt;/P&gt;&lt;P&gt;Rooms&lt;/P&gt;&lt;P&gt;Room1&lt;/P&gt;&lt;P&gt;Room2&lt;/P&gt;&lt;P&gt;Room3&lt;/P&gt;&lt;P&gt;Room4&lt;/P&gt;&lt;P&gt;Room2&lt;/P&gt;&lt;P&gt;Room3&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for text object:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=if(FieldIndex('Rooms',vCheck)&amp;gt;0, True(),False())&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Apr 2015 14:42:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-find-a-matching-value/m-p/831847#M292714</guid>
      <dc:creator>pokassov</dc:creator>
      <dc:date>2015-04-14T14:42:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to find a matching value</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-find-a-matching-value/m-p/831848#M292715</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;s1) Wildmatch conditional function: &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Wildmatch(Rooms, '*1','*2','*3')&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; returns 1 if field value contain '1' as last char, 2 if contain '2' char, 3 if contain '3' char&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;s2) Mixmatch&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 13.3333330154419px;"&gt;Mixmatch&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;(Rooms, 'room1','room2','room3')&lt;/SPAN&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; same logic but value must match all character in the array definition, is NOT case sensitive&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;s3) Match&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 13.3333330154419px;"&gt;Match&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;(Rooms, 'Room1','Room2','Room3')&lt;/SPAN&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; same logic, value must match all character in the array definition and IS case sensitive&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;You can use these functions in front end and back end statements&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Apr 2015 14:50:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-find-a-matching-value/m-p/831848#M292715</guid>
      <dc:creator />
      <dc:date>2015-04-14T14:50:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to find a matching value</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-find-a-matching-value/m-p/831849#M292716</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;can you add a listbox with Rooms as dimension and click on 'Show Frequency'&lt;/P&gt;&lt;P&gt;or you could add a straight table with Rooms as dimension and in the expression use any count or aggregate function on any column available in tables Rooms, then go to presentation and un-check the option 'Suppress zero values', this way if the value if 0 it means that there are no data.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Apr 2015 14:52:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-find-a-matching-value/m-p/831849#M292716</guid>
      <dc:creator>maleksafa</dc:creator>
      <dc:date>2015-04-14T14:52:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to find a matching value</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-find-a-matching-value/m-p/831850#M292717</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In my opinion the most "performance friendly" and powerful solution is:&lt;/P&gt;&lt;P&gt;A) first create a custom "flag" field in load statement&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;Rooms,&lt;/P&gt;&lt;P&gt;if(Wildmatch(Rooms,'*1'), 1,&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;if(Wildmatch(Rooms,'*2'), 2,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;if(Wildmatch(Rooms,'*3'), 3&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;)))&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; as&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RoomID&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;FROM [...] &lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;B) after that use set analysis to simplify calculations&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Count({&amp;lt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;RoomID&lt;/SPAN&gt;={1}&amp;gt;} Rooms)&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;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;Sum({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;RoomID&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;={1}&amp;gt;} MyFieldMetricValue)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Apr 2015 15:00:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-find-a-matching-value/m-p/831850#M292717</guid>
      <dc:creator />
      <dc:date>2015-04-14T15:00:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to find a matching value</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-find-a-matching-value/m-p/831851#M292718</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 want to thank all of you providing the correct answer so quickly. I used the following expression in the "Text" Object properties, color "background" and it worked. This was based on response from "Cepren" sorry for spelling in English, above:&lt;/P&gt;&lt;P&gt;In script:&lt;/P&gt;&lt;P&gt;=vCheck='Room1';&lt;/P&gt;&lt;P&gt;In "Text" object "Properties -&amp;gt; General tab -&amp;gt; "Background" section -&amp;gt; "Color" field -&amp;gt; "Calculated" field, I added&lt;/P&gt;&lt;P&gt;= &lt;SPAN style="font-size: 10pt;"&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;FieldIndex&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;('Rooms',&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style="color: #808080; font-size: 10pt;"&gt;&lt;STRONG&gt;&lt;EM style="color: #808080; font-size: 10pt;"&gt;vCheck&lt;/EM&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;)&amp;gt;0, &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;Color&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;(2),&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;Color&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;(5)) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;The strange things was that I had previously tried using FieldIndex before posting this question to QlikView Community, but I typed Rooms without quotes, and QlikView did not evaluate the "If" logic correctly.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;I also applied Match based on Carlo Belletti's suggestion and it worked also.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Raghu&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Apr 2015 15:41:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-find-a-matching-value/m-p/831851#M292718</guid>
      <dc:creator />
      <dc:date>2015-04-14T15:41:27Z</dc:date>
    </item>
  </channel>
</rss>

