<?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: Filter on yes/no field created from another field in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Filter-on-yes-no-field-created-from-another-field/m-p/1210314#M23197</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is this not the output you are looking for? I got this using the same script I provided above&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/141598_Capture.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 21 Oct 2016 17:14:19 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2016-10-21T17:14:19Z</dc:date>
    <item>
      <title>Filter on yes/no field created from another field</title>
      <link>https://community.qlik.com/t5/App-Development/Filter-on-yes-no-field-created-from-another-field/m-p/1210311#M23194</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm trying to create a yes-no field that I can use in a filter within my app. I'm ending up with duplicate rows. The point of the app is to provide a way for people to filter IDs that are in db#1 based on whether or not they exist in db#2. Here's a sample dataset that mimics the raw data I'm working with:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ID, dbnum, dbID&lt;/P&gt;&lt;P&gt;1, 1, EX4502&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;1, 2, 68465832&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;2, 1, VM640&lt;/P&gt;&lt;P&gt;3, 1, DX1201&lt;/P&gt;&lt;P&gt;3, 2, 49674828&lt;/P&gt;&lt;P&gt;4, 2, 3857393837&lt;/P&gt;&lt;P&gt;5, 1, VX12&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's how I'd like to transform the data:&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;ID, db1ID, db2ID, Has_db2ID&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;1, EX4502, 68465832, Yes&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;2, VM640, , No&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;3, DX1201, 49674828, Yes&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;4, , 3857393837, Yes&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;5, VX12, , No&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Here's the load query I'm using:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SET cYES = Dual('Yes', 1); &lt;/P&gt;&lt;P&gt;SET cNO = Dual('No', 0); &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DB2:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ID,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(dbnum = '1', dbID) as db1ID&lt;/P&gt;&lt;P&gt; FROM [file]&lt;/P&gt;&lt;P&gt;(qvd)&lt;/P&gt;&lt;P&gt;WHERE match(dbnum, '1');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;left keep LOAD&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ID,&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(dbnum = '2', dbID) as db2ID,&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(db = '2', $(cYES), $(cNO)) as Has_db2ID&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt; FROM [file]&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;(qvd)&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;WHERE match(dbnum, '2', '1');&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;I end up with data that looks and behaves like this:&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;ID, db1ID, db2ID, Has_db2ID&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;1, EX4502, , No&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;1, &lt;SPAN style="font-size: 13.3333px;"&gt;EX4502&lt;/SPAN&gt;, 68465832, Yes&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Within a table that displays the data, if I filter by ID = 1 I get multiple rows as above. I have a map in my app that lights up for ID = 1 when I filter for both yes and no values for Has_db2ID (after I load this data I'm also loading geospatial &amp;amp; other data that contains ID).&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;I've tried with resident loads, concatenating &amp;amp; other ways of creating the yes/no field, but still got the same result (or introduced other issues that still didn't get rid of the extra row). I need a data model that gives me one row per ID. Thanks for any advice!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Oct 2016 15:42:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Filter-on-yes-no-field-created-from-another-field/m-p/1210311#M23194</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-10-21T15:42:47Z</dc:date>
    </item>
    <item>
      <title>Re: Filter on yes/no field created from another field</title>
      <link>https://community.qlik.com/t5/App-Development/Filter-on-yes-no-field-created-from-another-field/m-p/1210312#M23195</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this may be:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Table:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD * Inline [&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ID, dbnum, dbID&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;1, 1, EX4502&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;1, 2, 68465832&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2, 1, VM640&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;3, 1, DX1201&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;3, 2, 49674828&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;4, 2, 3857393837&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;5, 1, VX12&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;];&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;TempTable:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD ID,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; dbID as db1ID&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Resident Table&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Where dbnum = 1;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Join (TempTable)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD ID,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; dbID as db2ID,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; 'Yes' as Has_db2ID&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Resident Table&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Where dbnum = 2;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;FinalTable:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;NoConcatenate&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD ID,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; db1ID,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; db2ID,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; If(IsNull(Has_db2ID), 'No', Has_db2ID) as Has_db2ID&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Resident TempTable;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;DROP Table Table, TempTable;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Oct 2016 15:54:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Filter-on-yes-no-field-created-from-another-field/m-p/1210312#M23195</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-10-21T15:54:02Z</dc:date>
    </item>
    <item>
      <title>Re: Filter on yes/no field created from another field</title>
      <link>https://community.qlik.com/t5/App-Development/Filter-on-yes-no-field-created-from-another-field/m-p/1210313#M23196</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Seems close, but it's not retaining the 'yes' values for Has_db2ID. It gives me only this result:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;1, EX4502, , No&lt;/P&gt;&lt;P style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;And cuts this result, which is the one I need:&lt;/P&gt;&lt;P style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;1, &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;EX4502&lt;/SPAN&gt;, 68465832, Yes&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;Experimenting with the If(IsNull... line in FinalTable to see if I can make it work.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Oct 2016 17:02:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Filter-on-yes-no-field-created-from-another-field/m-p/1210313#M23196</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-10-21T17:02:51Z</dc:date>
    </item>
    <item>
      <title>Re: Filter on yes/no field created from another field</title>
      <link>https://community.qlik.com/t5/App-Development/Filter-on-yes-no-field-created-from-another-field/m-p/1210314#M23197</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is this not the output you are looking for? I got this using the same script I provided above&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/141598_Capture.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Oct 2016 17:14:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Filter-on-yes-no-field-created-from-another-field/m-p/1210314#M23197</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-10-21T17:14:19Z</dc:date>
    </item>
    <item>
      <title>Re: Filter on yes/no field created from another field</title>
      <link>https://community.qlik.com/t5/App-Development/Filter-on-yes-no-field-created-from-another-field/m-p/1210315#M23198</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yep, you're right. Your file does it perfectly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my app, I was limiting some of the data on ingest, and it was causing the issue. I think I"m all set now.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you, Sunny T! Much appreciated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Oct 2016 17:50:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Filter-on-yes-no-field-created-from-another-field/m-p/1210315#M23198</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-10-21T17:50:10Z</dc:date>
    </item>
  </channel>
</rss>

