<?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: Subfield to separate columns mapping values in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Subfield-to-separate-columns-mapping-values/m-p/1835253#M68992</link>
    <description>&lt;P&gt;Try something like this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;OptionMapping:
Mapping
LOAD F1,
	 '@' &amp;amp; F2 &amp;amp; '@';
LOAD * INLINE [
    F1, F2
    Training, Option 1
    Support, Option 2
    Technology, Option 3
    Understanding, Option 4
    Ability, Option 5
];

Table:
LOAD [What has contributed most to your production or success to date?],
	 Value,
	 TextBetween(MapSubString('OptionMapping', Value), '@', '@') as Option;
LOAD [What has contributed most to your production or success to date?],
	 Trim(SubField([What has contributed most to your production or success to date?], ';')) as Value;	 
LOAD * INLINE [
    What has contributed most to your production or success to date?
    "Support from sales team (Coaching sessions, joint field work, ongoing communication, etc.) ;Technology (i.e. Agent Assist, virtual enrollment tools, etc.)"
    "Support from sales team (Coaching sessions, joint field work, ongoing communication, etc.) "
    "Training (Foundations Class, Opener GPS, etc.) ;Support from sales team (Coaching sessions, joint field work, ongoing communication, etc.) ;Understanding of compensation;Ability to gain new accounts"
    "Training (Foundations Class, Opener GPS, etc.) ;Support from sales team (Coaching sessions, joint field work, ongoing communication, etc.) "
    "Training (Foundations Class, Opener GPS, etc.) "
    "Training (Foundations Class, Opener GPS, etc.) ;Understanding of compensation"
];

FinalTable:
LOAD Distinct [What has contributed most to your production or success to date?]
Resident Table;

FOR i = 1 to FieldValueCount('Option')

	LET vOption = FieldValue('Option', $(i));
	
	Left Join (FinalTable)
	LOAD [What has contributed most to your production or success to date?],
		 Value as [$(vOption)]
	Resident Table
	Where Option = '$(vOption)';
	
NEXT

DROP Table Table;&lt;/LI-CODE&gt;</description>
    <pubDate>Fri, 10 Sep 2021 15:41:44 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2021-09-10T15:41:44Z</dc:date>
    <item>
      <title>Subfield to separate columns mapping values</title>
      <link>https://community.qlik.com/t5/App-Development/Subfield-to-separate-columns-mapping-values/m-p/1835185#M68987</link>
      <description>&lt;P&gt;In the load statement how do I make this column&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;STRONG&gt;What has contributed most to your production&amp;nbsp;or success&amp;nbsp;to date?&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Support from&amp;nbsp;sales team&amp;nbsp;(Coaching sessions, joint field work, ongoing communication, etc.)&amp;nbsp;;Technology (i.e. Agent Assist, virtual enrollment tools, etc.)&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Support from&amp;nbsp;sales team&amp;nbsp;(Coaching sessions, joint field work, ongoing communication, etc.)&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Training&amp;nbsp;(Foundations Class, Opener GPS, etc.)&amp;nbsp;;Support from&amp;nbsp;sales team&amp;nbsp;(Coaching sessions, joint field work, ongoing communication, etc.)&amp;nbsp;;Understanding of compensation;Ability to gain new accounts&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Training&amp;nbsp;(Foundations Class, Opener GPS, etc.)&amp;nbsp;;Support from&amp;nbsp;sales team&amp;nbsp;(Coaching sessions, joint field work, ongoing communication, etc.)&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Training&amp;nbsp;(Foundations Class, Opener GPS, etc.)&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Training&amp;nbsp;(Foundations Class, Opener GPS, etc.)&amp;nbsp;;Understanding of compensation&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Look like this&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Option1&lt;/TD&gt;&lt;TD&gt;Option2&lt;/TD&gt;&lt;TD&gt;Option3&lt;/TD&gt;&lt;TD&gt;Option4&lt;/TD&gt;&lt;TD&gt;Option5&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;Support from&amp;nbsp;sales team&amp;nbsp;(Coaching sessions, joint field work, ongoing communication, etc.)&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;Technology (i.e. Agent Assist, virtual enrollment tools, etc.)&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;Support from&amp;nbsp;sales team&amp;nbsp;(Coaching sessions, joint field work, ongoing communication, etc.)&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Training&amp;nbsp;(Foundations Class, Opener GPS, etc.)&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;Support from&amp;nbsp;sales team&amp;nbsp;(Coaching sessions, joint field work, ongoing communication, etc.)&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;Understanding of compensation&lt;/TD&gt;&lt;TD&gt;Ability to gain new accounts&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Training&amp;nbsp;(Foundations Class, Opener GPS, etc.)&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;Support from&amp;nbsp;sales team&amp;nbsp;(Coaching sessions, joint field work, ongoing communication, etc.)&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Training&amp;nbsp;(Foundations Class, Opener GPS, etc.)&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Training&amp;nbsp;(Foundations Class, Opener GPS, etc.)&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;Understanding of compensation&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Fri, 10 Sep 2021 11:46:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Subfield-to-separate-columns-mapping-values/m-p/1835185#M68987</guid>
      <dc:creator>mwscott1</dc:creator>
      <dc:date>2021-09-10T11:46:02Z</dc:date>
    </item>
    <item>
      <title>Re: Subfield to separate columns mapping values</title>
      <link>https://community.qlik.com/t5/App-Development/Subfield-to-separate-columns-mapping-values/m-p/1835253#M68992</link>
      <description>&lt;P&gt;Try something like this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;OptionMapping:
Mapping
LOAD F1,
	 '@' &amp;amp; F2 &amp;amp; '@';
LOAD * INLINE [
    F1, F2
    Training, Option 1
    Support, Option 2
    Technology, Option 3
    Understanding, Option 4
    Ability, Option 5
];

Table:
LOAD [What has contributed most to your production or success to date?],
	 Value,
	 TextBetween(MapSubString('OptionMapping', Value), '@', '@') as Option;
LOAD [What has contributed most to your production or success to date?],
	 Trim(SubField([What has contributed most to your production or success to date?], ';')) as Value;	 
LOAD * INLINE [
    What has contributed most to your production or success to date?
    "Support from sales team (Coaching sessions, joint field work, ongoing communication, etc.) ;Technology (i.e. Agent Assist, virtual enrollment tools, etc.)"
    "Support from sales team (Coaching sessions, joint field work, ongoing communication, etc.) "
    "Training (Foundations Class, Opener GPS, etc.) ;Support from sales team (Coaching sessions, joint field work, ongoing communication, etc.) ;Understanding of compensation;Ability to gain new accounts"
    "Training (Foundations Class, Opener GPS, etc.) ;Support from sales team (Coaching sessions, joint field work, ongoing communication, etc.) "
    "Training (Foundations Class, Opener GPS, etc.) "
    "Training (Foundations Class, Opener GPS, etc.) ;Understanding of compensation"
];

FinalTable:
LOAD Distinct [What has contributed most to your production or success to date?]
Resident Table;

FOR i = 1 to FieldValueCount('Option')

	LET vOption = FieldValue('Option', $(i));
	
	Left Join (FinalTable)
	LOAD [What has contributed most to your production or success to date?],
		 Value as [$(vOption)]
	Resident Table
	Where Option = '$(vOption)';
	
NEXT

DROP Table Table;&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 10 Sep 2021 15:41:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Subfield-to-separate-columns-mapping-values/m-p/1835253#M68992</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2021-09-10T15:41:44Z</dc:date>
    </item>
  </channel>
</rss>

