<?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: Create two fields from one in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Create-two-fields-from-one/m-p/482628#M180365</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 don't see it very clear but I'll show you the function SUBFIELD&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;subfield('Jonh-Smith','-',1) &amp;amp; ' ' &amp;amp; subfield('Jonh-Smith','-',2) = Jonh Smith&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That means you can break a field in several parts if the separator character is known. I've placed an n-dash this time but an space can be used as well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Salutes.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 26 Sep 2013 13:33:41 GMT</pubDate>
    <dc:creator>christian77</dc:creator>
    <dc:date>2013-09-26T13:33:41Z</dc:date>
    <item>
      <title>Create two fields from one</title>
      <link>https://community.qlik.com/t5/QlikView/Create-two-fields-from-one/m-p/482627#M180364</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 have a field called Staff where I'd like to add their full name and respective department.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Staff&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;JohnA&lt;/P&gt;&lt;P&gt;JohnS&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was wondering if there was a way to do this, such as like the Dual function rather than two IF statements which would give the following ouput as I'd like to use them in a Multi Box.&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid rgb(0, 0, 0); width: 100%;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Staff&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;Department&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;John Anderson&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;HR&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;John Smith&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;Finance&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[Staff Details]:&lt;/P&gt;&lt;P&gt;LOAD "Staff" AS Staff,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(Staff='JohnA',Dual('John Anderson','HR'),&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(Staff='JohnS',Dual('John Smith','Finance'),)&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;) AS Department&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;RESIDENT [Staff Link]&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;BR /&gt;Darren&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Sep 2013 12:49:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-two-fields-from-one/m-p/482627#M180364</guid>
      <dc:creator>darren_dixon</dc:creator>
      <dc:date>2013-09-26T12:49:18Z</dc:date>
    </item>
    <item>
      <title>Re: Create two fields from one</title>
      <link>https://community.qlik.com/t5/QlikView/Create-two-fields-from-one/m-p/482628#M180365</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 don't see it very clear but I'll show you the function SUBFIELD&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;subfield('Jonh-Smith','-',1) &amp;amp; ' ' &amp;amp; subfield('Jonh-Smith','-',2) = Jonh Smith&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That means you can break a field in several parts if the separator character is known. I've placed an n-dash this time but an space can be used as well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Salutes.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Sep 2013 13:33:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-two-fields-from-one/m-p/482628#M180365</guid>
      <dc:creator>christian77</dc:creator>
      <dc:date>2013-09-26T13:33:41Z</dc:date>
    </item>
    <item>
      <title>Re: Create two fields from one</title>
      <link>https://community.qlik.com/t5/QlikView/Create-two-fields-from-one/m-p/482629#M180366</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dual would require a numeric parameter, therefore, in your case it would not help you. You can use pick() and match() in combination which would improve the performance compared to multiple IFs.&lt;/P&gt;&lt;P&gt;Try like:&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;Pick(Match(Staff, 'JohnA','JohnS'), 'HR' , 'Finance') as Department&lt;/P&gt;&lt;P&gt; From &amp;lt;&amp;gt;;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Sep 2013 13:42:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-two-fields-from-one/m-p/482629#M180366</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2013-09-26T13:42:01Z</dc:date>
    </item>
    <item>
      <title>Re: Create two fields from one</title>
      <link>https://community.qlik.com/t5/QlikView/Create-two-fields-from-one/m-p/482630#M180367</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dual allows you to combine a numeric and text value together into a single field. It is not going to work in the way you need. You are going to need to have multiple fields. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Sep 2013 13:48:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-two-fields-from-one/m-p/482630#M180367</guid>
      <dc:creator>DavidFoster1</dc:creator>
      <dc:date>2013-09-26T13:48:08Z</dc:date>
    </item>
    <item>
      <title>Re: Create two fields from one</title>
      <link>https://community.qlik.com/t5/QlikView/Create-two-fields-from-one/m-p/482631#M180368</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can use mapping funcions:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//Create the Mapping Table&lt;/P&gt;&lt;P&gt;StaffMap:&lt;/P&gt;&lt;P&gt;Mapping&lt;/P&gt;&lt;P&gt;LOAD * INLINE [&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Staff, &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Department&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; JohnS, HR&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; JohnA, Finance&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//Load your table&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;[Staff Details]:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;LOAD "Staff"&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;&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;&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; AS Staff,&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; applymap('StaffMap',Staff,'Not Found')&lt;SPAN style="font-family: inherit; font-size: 10pt; font-style: inherit; line-height: 1.5em;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AS Department&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;RESIDENT [Staff Link]&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Sep 2013 14:12:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-two-fields-from-one/m-p/482631#M180368</guid>
      <dc:creator />
      <dc:date>2013-09-26T14:12:35Z</dc:date>
    </item>
  </channel>
</rss>

