<?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: Where Exists([MyField], 'MyValue') in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Where-Exists-MyField-MyValue/m-p/1746437#M453333</link>
    <description>&lt;P&gt;As far as the second parameter is used it's no optimized load anymore. In the end it's more a matter of the own habits to create a workflow which ensured that the loadings could be run optimized as that it caused more efforts or leads to a confusing load-script. Like mentioned I use it quite frequently and sometimes dozens of times in a single script preferably with some generic data or external control-data (usually Excel in which the users could define which data should be considered), like:&lt;/P&gt;&lt;P&gt;ExistsFilter: load date(floor(yearstart(today())) + rowno() - 1) as DATE autogenerate daynumberofyear(today());&lt;BR /&gt;t: load * from QVD where exists(DATE);&lt;BR /&gt;drop table&amp;nbsp;ExistsFilter;&lt;/P&gt;&lt;P&gt;ExistsFilter: load pick(recno(), 'Cat1', 'Cat5') as Cat autogenerate 2;&lt;BR /&gt;t: load * from QVD where exists(Cat);&lt;BR /&gt;drop table&amp;nbsp;ExistsFilter;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;</description>
    <pubDate>Wed, 23 Sep 2020 13:38:15 GMT</pubDate>
    <dc:creator>marcus_sommer</dc:creator>
    <dc:date>2020-09-23T13:38:15Z</dc:date>
    <item>
      <title>Where Exists([MyField], 'MyValue')</title>
      <link>https://community.qlik.com/t5/QlikView/Where-Exists-MyField-MyValue/m-p/1741803#M452994</link>
      <description>&lt;P&gt;I have been using &lt;STRONG&gt;Where Exists&lt;/STRONG&gt;() expression for a long time, but only now I decided to read the &lt;A href="https://help.qlik.com/en-US/qlikview/April2020/Subsystems/Client/Content/QV_QlikView/Scripting/InterRecordFunctions/Exists.htm" target="_self"&gt;help&lt;/A&gt; and I was shocked.&lt;/P&gt;&lt;P&gt;The &lt;A href="https://help.qlik.com/en-US/qlikview/April2020/Subsystems/Client/Content/QV_QlikView/Scripting/InterRecordFunctions/Exists.htm" target="_self"&gt;help&lt;/A&gt; says -&amp;nbsp;&lt;STRONG&gt;expr&lt;/STRONG&gt;&amp;nbsp;-The value that you want to check if it exists. &lt;U&gt;&lt;STRONG&gt;You can use an explicit value&lt;/STRONG&gt;&lt;/U&gt; or an expression that refers to one or several fields in the current load statement.&lt;/P&gt;&lt;P&gt;All this time I could use explicit values in &lt;STRONG&gt;Where Exists&lt;/STRONG&gt;()???&lt;/P&gt;&lt;P&gt;Why didn't I read this before?&lt;/P&gt;&lt;P&gt;Below is an example -&amp;nbsp;&lt;SPAN&gt;Exists(Employee, 'Bill')&amp;nbsp; -&amp;nbsp;Returns -1 (True) if the field value&amp;nbsp;&lt;SPAN class="statement"&gt;'Bill'&lt;/SPAN&gt;&amp;nbsp;is found in the current content of the field&amp;nbsp;&lt;SPAN class="statement"&gt;Employee&lt;/SPAN&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Then I wrote the following code and it doesn't work and I don't understand why. What am I doing wrong?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;t1:&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;NoConcatenate&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;LOAD RowNo() as [A] AutoGenerate(10);&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;STORE t1 into t1.qvd (qvd);&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;DROP Table t1;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;t2:&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;NoConcatenate&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;LOAD [A] FROM [t1.qvd] (qvd) Where Exists([A], '2');&lt;/EM&gt; //Where Exists([A], 2) -&amp;nbsp;value without quotes also doesn't work.&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 00:01:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Where-Exists-MyField-MyValue/m-p/1741803#M452994</guid>
      <dc:creator>warfollowmy_ver</dc:creator>
      <dc:date>2024-11-16T00:01:00Z</dc:date>
    </item>
    <item>
      <title>Re: Where Exists([MyField], 'MyValue')</title>
      <link>https://community.qlik.com/t5/QlikView/Where-Exists-MyField-MyValue/m-p/1741805#M452995</link>
      <description>&lt;P&gt;The way I understand it is you would have a pre-stored table instead of QVD to use Exists. I updated your script, and you could find attached QVW to see if this is correct understanding. Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 08 Sep 2020 01:19:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Where-Exists-MyField-MyValue/m-p/1741805#M452995</guid>
      <dc:creator>alex00321</dc:creator>
      <dc:date>2020-09-08T01:19:41Z</dc:date>
    </item>
    <item>
      <title>Re: Where Exists([MyField], 'MyValue')</title>
      <link>https://community.qlik.com/t5/QlikView/Where-Exists-MyField-MyValue/m-p/1741811#M452996</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Thanks for the answer.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;What does your solution give? Only the value 2 remains in the table t2?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;t1:&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;NoConcatenate&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;LOAD RowNo() as [A] AutoGenerate(10);&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;t2:&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;NoConcatenate&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;LOAD [A] as [B] Resident t1 Where Exists([A], '2');&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;The required selection does not take place, because in memory there is a table t1 with a field A and the selection goes through all values of the field A of all tables.&lt;/P&gt;</description>
      <pubDate>Tue, 08 Sep 2020 03:34:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Where-Exists-MyField-MyValue/m-p/1741811#M452996</guid>
      <dc:creator>warfollowmy_ver</dc:creator>
      <dc:date>2020-09-08T03:34:13Z</dc:date>
    </item>
    <item>
      <title>Re: Where Exists([MyField], 'MyValue')</title>
      <link>https://community.qlik.com/t5/QlikView/Where-Exists-MyField-MyValue/m-p/1746184#M453321</link>
      <description>&lt;P&gt;Only additional thing I have is a Design Blog post that may help, not sure though:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/t5/Qlik-Design-Blog/Dual-Exists-Useful-Functions/ba-p/1465290" target="_blank"&gt;https://community.qlik.com/t5/Qlik-Design-Blog/Dual-Exists-Useful-Functions/ba-p/1465290&lt;/A&gt;&lt;/P&gt;&lt;P&gt;You will likely need to attach a sample QVW file otherwise so folks can dig into the data model as well as the expressions etc. in order to get further respones.&lt;/P&gt;&lt;P&gt;Regards,&lt;BR /&gt;Brett&lt;/P&gt;&lt;P&gt;Regards,&lt;BR /&gt;Brett&lt;/P&gt;</description>
      <pubDate>Tue, 22 Sep 2020 21:04:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Where-Exists-MyField-MyValue/m-p/1746184#M453321</guid>
      <dc:creator>Brett_Bleess</dc:creator>
      <dc:date>2020-09-22T21:04:19Z</dc:date>
    </item>
    <item>
      <title>Re: Where Exists([MyField], 'MyValue')</title>
      <link>https://community.qlik.com/t5/QlikView/Where-Exists-MyField-MyValue/m-p/1746211#M453326</link>
      <description>&lt;P&gt;I presented a very specific code in the first message and a link to your own help.&lt;BR /&gt;You can create the file yourself and paste the code. I cannot even imagine a more specific formulation of the question.&lt;/P&gt;</description>
      <pubDate>Wed, 23 Sep 2020 00:32:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Where-Exists-MyField-MyValue/m-p/1746211#M453326</guid>
      <dc:creator>warfollowmy_ver</dc:creator>
      <dc:date>2020-09-23T00:32:59Z</dc:date>
    </item>
    <item>
      <title>Re: Where Exists([MyField], 'MyValue')</title>
      <link>https://community.qlik.com/t5/QlikView/Where-Exists-MyField-MyValue/m-p/1746372#M453327</link>
      <description>&lt;P&gt;I never tried to use exists() in the way like your example, although the documentation says it's a valid statement and therefore I'm not sure if there is a bug respectively a change within the feature (since a certain release) or if it's a mistake within the documentation - means directly in parts a wrong statement or they missed better explaining examples.&lt;/P&gt;&lt;P&gt;I would say the important point within the documentation is:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;You can use &lt;STRIKE&gt;an explicit value or&lt;/STRIKE&gt; an expression that &lt;STRONG&gt;refers to one or several fields in the current load&lt;/STRONG&gt; statement.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;As far as such references are been used it worked like expected - but the mentioned explicit values seems not be treated as fieldvalues and are probably just ignored. In regard to your example you could change it in this way:&lt;/P&gt;&lt;P&gt;...&amp;nbsp;Where Exists([A], match([A], 2)) ...&lt;/P&gt;&lt;P&gt;I doubt that this is much helpful as well as I don't see any benefits in using explicit values at all in exists() because match(), applymap() and similar functions are usually more suitable for such use-cases.&lt;/P&gt;&lt;P&gt;This doesn't mean that you should discard exists() with a second parameter at all else just ensuring that you refers to fields within the current load. In the past I used it quite often and it worked like it should. Nowadays the use is rather rarely because I create most of my qvd's with the appropriate fields and/or use specific load-orders with various temporary dummy-tables to avoid the second parameter and to be able to load the qvd's optimized.&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;</description>
      <pubDate>Wed, 23 Sep 2020 11:41:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Where-Exists-MyField-MyValue/m-p/1746372#M453327</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2020-09-23T11:41:20Z</dc:date>
    </item>
    <item>
      <title>Re: Where Exists([MyField], 'MyValue')</title>
      <link>https://community.qlik.com/t5/QlikView/Where-Exists-MyField-MyValue/m-p/1746381#M453330</link>
      <description>&lt;P&gt;Thanks for the answer. Yes, that's what interests. I think the description help is just a mistake. But I was immediately delighted and thought how great it would be if I passed a list as values ​​instead of loading a table with a field in advance, and this would work just as quickly and optimally as qvd optimized.&lt;/P&gt;</description>
      <pubDate>Wed, 23 Sep 2020 11:52:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Where-Exists-MyField-MyValue/m-p/1746381#M453330</guid>
      <dc:creator>warfollowmy_ver</dc:creator>
      <dc:date>2020-09-23T11:52:25Z</dc:date>
    </item>
    <item>
      <title>Re: Where Exists([MyField], 'MyValue')</title>
      <link>https://community.qlik.com/t5/QlikView/Where-Exists-MyField-MyValue/m-p/1746437#M453333</link>
      <description>&lt;P&gt;As far as the second parameter is used it's no optimized load anymore. In the end it's more a matter of the own habits to create a workflow which ensured that the loadings could be run optimized as that it caused more efforts or leads to a confusing load-script. Like mentioned I use it quite frequently and sometimes dozens of times in a single script preferably with some generic data or external control-data (usually Excel in which the users could define which data should be considered), like:&lt;/P&gt;&lt;P&gt;ExistsFilter: load date(floor(yearstart(today())) + rowno() - 1) as DATE autogenerate daynumberofyear(today());&lt;BR /&gt;t: load * from QVD where exists(DATE);&lt;BR /&gt;drop table&amp;nbsp;ExistsFilter;&lt;/P&gt;&lt;P&gt;ExistsFilter: load pick(recno(), 'Cat1', 'Cat5') as Cat autogenerate 2;&lt;BR /&gt;t: load * from QVD where exists(Cat);&lt;BR /&gt;drop table&amp;nbsp;ExistsFilter;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;</description>
      <pubDate>Wed, 23 Sep 2020 13:38:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Where-Exists-MyField-MyValue/m-p/1746437#M453333</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2020-09-23T13:38:15Z</dc:date>
    </item>
    <item>
      <title>Re: Where Exists([MyField], 'MyValue')</title>
      <link>https://community.qlik.com/t5/QlikView/Where-Exists-MyField-MyValue/m-p/1746551#M453339</link>
      <description>&lt;P&gt;&lt;EM&gt;Try this:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;t1:&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;NoConcatenate&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;LOAD RowNo() as [&lt;STRONG&gt;B&lt;/STRONG&gt;] AutoGenerate(10);&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;STORE t1 into t1.qvd (qvd);&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;DROP Table t1;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;t2:&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;NoConcatenate&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;LOAD [A] FROM [t1.qvd] (qvd) Where Exists([B],[A]);&lt;/EM&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp;//This will load where B=A&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Sep 2020 18:28:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Where-Exists-MyField-MyValue/m-p/1746551#M453339</guid>
      <dc:creator>dadumas</dc:creator>
      <dc:date>2020-09-23T18:28:23Z</dc:date>
    </item>
    <item>
      <title>Re: Where Exists([MyField], 'MyValue')</title>
      <link>https://community.qlik.com/t5/QlikView/Where-Exists-MyField-MyValue/m-p/2511022#M1226472</link>
      <description>&lt;P&gt;I know this is an old thread, but the problem is the:&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;Drop Table t1;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;Field [A] no longer exists after the drop.&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;</description>
      <pubDate>Fri, 21 Mar 2025 15:53:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Where-Exists-MyField-MyValue/m-p/2511022#M1226472</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2025-03-21T15:53:41Z</dc:date>
    </item>
  </channel>
</rss>

