<?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: Can I define field as Dual without using LOAD Inline in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Can-I-define-field-as-Dual-without-using-LOAD-Inline/m-p/1372688#M419321</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the quick replies guys. I'm all set now thanks to you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 09 Aug 2017 13:24:39 GMT</pubDate>
    <dc:creator />
    <dc:date>2017-08-09T13:24:39Z</dc:date>
    <item>
      <title>Can I define field as Dual without using LOAD Inline</title>
      <link>https://community.qlik.com/t5/QlikView/Can-I-define-field-as-Dual-without-using-LOAD-Inline/m-p/1372685#M419318</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 want to use the Dual function on a field in a LOAD statement that reads from a table. However, all the examples I'm finding about Dual only show it being used with LOAD INLINE statements. Is it possible to do what I want? If so, could someone please give me the syntax?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let's use the below as a starting example. I read in a QVD containing 3 fields and want to create a 4th field that will have a 1 if an app is considered critical and 0 if it's not. However, when I create a listbox for that field, I want to display 'Yes' for the 1 and 'No' for the 0. Seems like a perfect use case for the Dual. Here's my code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;APPS:&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;LOAD AppID,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;AppName,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;Priority,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;IF(Priority &amp;lt; 3, 1, 0) as isCritical&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;FROM [APPS.QVD] (qvd);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P&gt;I couldn't figure out how to use the Dual function on the 'isCritical' field so I thought I'd create another table using LOAD INLINE like this:&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;DualVals:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;Load dual(isCriticalText,isCriticalNum) as isCritical&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;Inline&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;[isCriticalText,isCriticalNum&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;Yes, 1&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;No, 0];&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As expected, the DualVals table is linked to the APPS table with the isCritical field. However, if I create a listbox for that field it still shows 0 and 1. I thought the isCriticalText would show up in the list of possible fields when creating a new listbox so I could use it, but it doesn't. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm stuck. Any help would be appreciated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Aug 2017 11:57:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Can-I-define-field-as-Dual-without-using-LOAD-Inline/m-p/1372685#M419318</guid>
      <dc:creator />
      <dc:date>2017-08-09T11:57:43Z</dc:date>
    </item>
    <item>
      <title>Re: Can I define field as Dual without using LOAD Inline</title>
      <link>https://community.qlik.com/t5/QlikView/Can-I-define-field-as-Dual-without-using-LOAD-Inline/m-p/1372686#M419319</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can use Dual whether you are loading from a table, database or inline.&lt;/P&gt;&lt;P&gt;You can also use Dual within expressions, though it is most commonly used in the load script.&lt;/P&gt;&lt;P&gt;Dual is just another Qlik function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See this post by &lt;A href="https://community.qlik.com/qlik-users/156808"&gt;robert_mika&lt;/A&gt;‌&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;A href="https://community.qlik.com/docs/DOC-8106"&gt;How to use- Dual()&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Aug 2017 12:06:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Can-I-define-field-as-Dual-without-using-LOAD-Inline/m-p/1372686#M419319</guid>
      <dc:creator>Colin-Albert</dc:creator>
      <dc:date>2017-08-09T12:06:23Z</dc:date>
    </item>
    <item>
      <title>Re: Can I define field as Dual without using LOAD Inline</title>
      <link>https://community.qlik.com/t5/QlikView/Can-I-define-field-as-Dual-without-using-LOAD-Inline/m-p/1372687#M419320</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can use the dual function anywhere e.g.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding: 0 0 0 30px; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: 'courier new', courier;"&gt;APPS:&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding: 0 0 0 30px; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: 'courier new', courier;"&gt;LOAD AppID,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding: 0 0 0 60px; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: 'courier new', courier;"&gt;AppName,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding: 0 0 0 60px; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: 'courier new', courier;"&gt;Priority,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding: 0 0 0 60px; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: 'courier new', courier;"&gt;Dual(&lt;SPAN style="color: #3d3d3d; font-family: 'courier new', courier; font-size: 13px;"&gt;IF(Priority &amp;lt; 3, 'Yes', 'No'),&lt;/SPAN&gt;IF(Priority &amp;lt; 3, 1, 0)) as isCritical&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding: 0 0 0 30px; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: 'courier new', courier;"&gt;FROM [APPS.QVD] (qvd);&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Aug 2017 12:06:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Can-I-define-field-as-Dual-without-using-LOAD-Inline/m-p/1372687#M419320</guid>
      <dc:creator>stigchel</dc:creator>
      <dc:date>2017-08-09T12:06:40Z</dc:date>
    </item>
    <item>
      <title>Re: Can I define field as Dual without using LOAD Inline</title>
      <link>https://community.qlik.com/t5/QlikView/Can-I-define-field-as-Dual-without-using-LOAD-Inline/m-p/1372688#M419321</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the quick replies guys. I'm all set now thanks to you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Aug 2017 13:24:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Can-I-define-field-as-Dual-without-using-LOAD-Inline/m-p/1372688#M419321</guid>
      <dc:creator />
      <dc:date>2017-08-09T13:24:39Z</dc:date>
    </item>
  </channel>
</rss>

