<?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: Splitting data into two tables based on one field and character in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Splitting-data-into-two-tables-based-on-one-field-and-character/m-p/1776461#M60199</link>
    <description>&lt;P&gt;I am okay with the tables being linked I think. I want to separate them because ACC is like a top level code and then everything with a ':' falls under ACC&amp;nbsp; and would be essentially like a bottom level code and I want that to be in a different table for analyzing.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 21 Jan 2021 18:57:38 GMT</pubDate>
    <dc:creator>heathqm</dc:creator>
    <dc:date>2021-01-21T18:57:38Z</dc:date>
    <item>
      <title>Splitting data into two tables based on one field and character</title>
      <link>https://community.qlik.com/t5/App-Development/Splitting-data-into-two-tables-based-on-one-field-and-character/m-p/1776435#M60191</link>
      <description>&lt;P&gt;I want to take one table and split it into two separate tables&amp;nbsp; based on one field and a character inside that field in the dat a load editor.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I currently have a table that looks like this:&lt;/P&gt;&lt;P&gt;Code&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Description&lt;/P&gt;&lt;P&gt;AAA&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;One code&lt;/P&gt;&lt;P&gt;AAA&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; one position&lt;/P&gt;&lt;P&gt;AAA:B&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;service&lt;/P&gt;&lt;P&gt;AAA:C&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Agency&lt;/P&gt;&lt;P&gt;AAA:FY&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Manager&lt;/P&gt;&lt;P&gt;ECT......... with many more rows.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to separate this table into two tables one that has all the codes without ':' in them along with their description and then another table that has the codes with ':' in them along with their descriptions. It would look like this:&lt;/P&gt;&lt;P&gt;Table 1:&lt;/P&gt;&lt;P&gt;Code&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Description&lt;/P&gt;&lt;P&gt;AAA&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;One code&lt;/P&gt;&lt;P&gt;AAA&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; one position&lt;/P&gt;&lt;P&gt;Table 2:&lt;/P&gt;&lt;P&gt;Code&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Description&lt;/P&gt;&lt;P&gt;AAA:B&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;service&lt;/P&gt;&lt;P&gt;AAA:C&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Agency&lt;/P&gt;&lt;P&gt;AAA:FY&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Manager&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;how would I do this?&lt;/P&gt;</description>
      <pubDate>Mon, 20 Dec 2021 21:05:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Splitting-data-into-two-tables-based-on-one-field-and-character/m-p/1776435#M60191</guid>
      <dc:creator>heathqm</dc:creator>
      <dc:date>2021-12-20T21:05:46Z</dc:date>
    </item>
    <item>
      <title>Re: Splitting data into two tables based on one field and character</title>
      <link>https://community.qlik.com/t5/App-Development/Splitting-data-into-two-tables-based-on-one-field-and-character/m-p/1776445#M60194</link>
      <description>&lt;P&gt;Try this:&lt;/P&gt;&lt;P&gt;Qualify *;&lt;/P&gt;&lt;P&gt;Table1:&lt;/P&gt;&lt;P&gt;Load Code, Description&lt;/P&gt;&lt;P&gt;Resident&amp;nbsp;&lt;EM&gt;current_table&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;where findoneof(Code,':')=0;&lt;/P&gt;&lt;P&gt;Table2:&lt;/P&gt;&lt;P&gt;Load Code, Description&lt;/P&gt;&lt;P&gt;Resident&amp;nbsp;&lt;EM&gt;Current_Table&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;where findoneof(Code,':')&amp;gt;0;&lt;/P&gt;&lt;P&gt;Unqualify *;&lt;/P&gt;&lt;P&gt;If you rename the columns yourself, you won't need the Qualify and Unqualify statements.&amp;nbsp; This avoids the tables be linked.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jan 2021 18:23:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Splitting-data-into-two-tables-based-on-one-field-and-character/m-p/1776445#M60194</guid>
      <dc:creator>GaryGiles</dc:creator>
      <dc:date>2021-01-21T18:23:00Z</dc:date>
    </item>
    <item>
      <title>Re: Splitting data into two tables based on one field and character</title>
      <link>https://community.qlik.com/t5/App-Development/Splitting-data-into-two-tables-based-on-one-field-and-character/m-p/1776453#M60196</link>
      <description>&lt;P&gt;That seems to work but the field names are now Table1:Code and Table2:Code. Is there a way to get the table name out of there?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jan 2021 18:41:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Splitting-data-into-two-tables-based-on-one-field-and-character/m-p/1776453#M60196</guid>
      <dc:creator>heathqm</dc:creator>
      <dc:date>2021-01-21T18:41:42Z</dc:date>
    </item>
    <item>
      <title>Re: Splitting data into two tables based on one field and character</title>
      <link>https://community.qlik.com/t5/App-Development/Splitting-data-into-two-tables-based-on-one-field-and-character/m-p/1776460#M60198</link>
      <description>&lt;P&gt;Yes, but you don't want the column names to be the same in both tables or Qlik Sense will try to association (link) the tables together in your data model.&amp;nbsp; Why are you trying to separate the tables in the data model?&lt;/P&gt;&lt;P&gt;To rename fields in the load script use&amp;nbsp; Load columname AS newcolumnname&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jan 2021 18:54:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Splitting-data-into-two-tables-based-on-one-field-and-character/m-p/1776460#M60198</guid>
      <dc:creator>GaryGiles</dc:creator>
      <dc:date>2021-01-21T18:54:20Z</dc:date>
    </item>
    <item>
      <title>Re: Splitting data into two tables based on one field and character</title>
      <link>https://community.qlik.com/t5/App-Development/Splitting-data-into-two-tables-based-on-one-field-and-character/m-p/1776461#M60199</link>
      <description>&lt;P&gt;I am okay with the tables being linked I think. I want to separate them because ACC is like a top level code and then everything with a ':' falls under ACC&amp;nbsp; and would be essentially like a bottom level code and I want that to be in a different table for analyzing.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jan 2021 18:57:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Splitting-data-into-two-tables-based-on-one-field-and-character/m-p/1776461#M60199</guid>
      <dc:creator>heathqm</dc:creator>
      <dc:date>2021-01-21T18:57:38Z</dc:date>
    </item>
    <item>
      <title>Re: Splitting data into two tables based on one field and character</title>
      <link>https://community.qlik.com/t5/App-Development/Splitting-data-into-two-tables-based-on-one-field-and-character/m-p/1776507#M60203</link>
      <description>&lt;P&gt;It might be cleaner to simply separate the two fields into two distinct columns in the same table.&amp;nbsp; You can then use set analysis in Qlik to separate rows for analysis.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Join (&lt;EM&gt;current_table)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Load code,&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; subfield(code,':',1) as TopLevelCode,&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;subfield(code,':',1) as SubLevelCode,&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(findoneof(code,':')=0,1,2) as Level&lt;/P&gt;&lt;P&gt;Resident&amp;nbsp;&lt;EM&gt;current_table&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;This would create 3 additional fields in your current table that separate the code value.&amp;nbsp; You still have your original code intact.&amp;nbsp; The Level field will make easy to choose Level 1 or 2.&amp;nbsp; Again, I'm not totally clear on your objective, but this might be a better approach.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jan 2021 21:04:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Splitting-data-into-two-tables-based-on-one-field-and-character/m-p/1776507#M60203</guid>
      <dc:creator>GaryGiles</dc:creator>
      <dc:date>2021-01-21T21:04:26Z</dc:date>
    </item>
  </channel>
</rss>

