<?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 create 2 tables from one in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/create-2-tables-from-one/m-p/1778464#M718094</link>
    <description>&lt;P&gt;HI,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have 2 tables one which has call data and another one with parent and child relationship. Trying to split parent and child but want to keep call details for both.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Table: Accounts&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Parent ID&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;Parent Name&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Child ID&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ChildName&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Table: CallDetails&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Account ID&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Call ID&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;Call Notes&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The "&lt;STRONG&gt;AccountID&lt;/STRONG&gt;&amp;nbsp;"in call table shows calls for both child and parent so how can i separate this I think creating two table out of account table is best way to do it so I need to split child and parent but still maintain the relationship between child and parent to be able to create a network chart.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Note: I would like to create a link attribute for parent and child if possible when I am splitting the table&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
    <pubDate>Sat, 16 Nov 2024 17:33:16 GMT</pubDate>
    <dc:creator>garyk22</dc:creator>
    <dc:date>2024-11-16T17:33:16Z</dc:date>
    <item>
      <title>create 2 tables from one</title>
      <link>https://community.qlik.com/t5/QlikView/create-2-tables-from-one/m-p/1778464#M718094</link>
      <description>&lt;P&gt;HI,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have 2 tables one which has call data and another one with parent and child relationship. Trying to split parent and child but want to keep call details for both.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Table: Accounts&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Parent ID&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;Parent Name&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Child ID&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ChildName&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Table: CallDetails&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Account ID&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Call ID&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;Call Notes&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The "&lt;STRONG&gt;AccountID&lt;/STRONG&gt;&amp;nbsp;"in call table shows calls for both child and parent so how can i separate this I think creating two table out of account table is best way to do it so I need to split child and parent but still maintain the relationship between child and parent to be able to create a network chart.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Note: I would like to create a link attribute for parent and child if possible when I am splitting the table&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 17:33:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/create-2-tables-from-one/m-p/1778464#M718094</guid>
      <dc:creator>garyk22</dc:creator>
      <dc:date>2024-11-16T17:33:16Z</dc:date>
    </item>
    <item>
      <title>Re: create 2 tables from one</title>
      <link>https://community.qlik.com/t5/QlikView/create-2-tables-from-one/m-p/1778482#M718095</link>
      <description>&lt;P&gt;if i understand it correctly, two fields in Account needs to be linked to one field in details&lt;/P&gt;&lt;P&gt;there will be a few ways to solve this and each will be correct - it will just depend on the development style of whoever is doing it and optimization considerations.&lt;/P&gt;&lt;P&gt;one way is to do a bridge:&lt;BR /&gt;in accounts- create a field which is concat of Parent and Child (ParentID &amp;amp; '|' &amp;amp; ChildID) at the start leave it as string&lt;/P&gt;&lt;P&gt;then create a temptable:&lt;BR /&gt;load distinct of teh new field + Parent ID and Child ID&lt;BR /&gt;create the bridge:&lt;BR /&gt;load distinct of Key, ParentID as AccountID, 'PARENT' as datatype&lt;BR /&gt;concatenate&amp;nbsp;load distinct of Key, ChildID as AccountID, 'CHILD' as datatype&lt;/P&gt;&lt;P&gt;so if you need to analyze parents, just add datatype={'PARENT'} in set analysis..&lt;BR /&gt;if you just need straight list of all accounts + details regardless of parent/child, just use accountID and the details.&amp;nbsp; it will automatically link the respective accounts.&lt;/P&gt;&lt;P&gt;even if a single accountID is linked to both parent and child, at the end of the day QV will sum only what is in the details (assuming that is where your measures are)&amp;nbsp; to illustrate:&lt;/P&gt;&lt;P&gt;details:&lt;/P&gt;&lt;P&gt;Account&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Measure&lt;BR /&gt;Acct1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 100&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;bridge:&amp;nbsp;&lt;/P&gt;&lt;P&gt;Account&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Key (Parent Child)&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Datatype&lt;BR /&gt;Acct1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Acct1 | Acct2&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; PARENT&lt;BR /&gt;Acct1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Acct3|Acct1&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; CHILD&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;ParentChild:&lt;/P&gt;&lt;P&gt;Parent&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Child&lt;BR /&gt;Acct1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Acct2&lt;BR /&gt;Acct3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Acct1&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;if through SQL, this would duplicate the entries for ACCT1 possibly giving you 200 as sum(measure)&lt;BR /&gt;but QV doesnt care how many records is created to get to your measure it doesnt double count:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Account&amp;nbsp; &amp;nbsp; Sum(Measure)&lt;BR /&gt;Acct1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;100&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Jan 2021 15:28:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/create-2-tables-from-one/m-p/1778482#M718095</guid>
      <dc:creator>edwin</dc:creator>
      <dc:date>2021-01-29T15:28:29Z</dc:date>
    </item>
    <item>
      <title>Re: create 2 tables from one</title>
      <link>https://community.qlik.com/t5/QlikView/create-2-tables-from-one/m-p/1778484#M718096</link>
      <description>&lt;P&gt;once youve finalized this, you can use autonumber on the new field to optimize / save on memory&lt;/P&gt;&lt;P&gt;it is easier to test if you can see the content of your fields&lt;/P&gt;</description>
      <pubDate>Fri, 29 Jan 2021 15:30:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/create-2-tables-from-one/m-p/1778484#M718096</guid>
      <dc:creator>edwin</dc:creator>
      <dc:date>2021-01-29T15:30:12Z</dc:date>
    </item>
    <item>
      <title>Re: create 2 tables from one</title>
      <link>https://community.qlik.com/t5/QlikView/create-2-tables-from-one/m-p/1778545#M718097</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/58578"&gt;@edwin&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your response. In a way it's correct that there are call details in the second table. It's hard for me to follow what you wrote because I am very new to this. Please review below script and suggest me changes as it gives me an error "Key" not found&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD PARENTID, &lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;ChildID , &lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;Child_Name , &lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;Parent_Name,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Parent_Account_vod__c&amp;amp;'|'&amp;amp;Child_Account_vod__c as IDs&lt;/STRONG&gt;&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;SELECT &lt;STRONG&gt;PARENTID, &lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;ChildID , &lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;Child_Name , &lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;Parent_Name,&lt;/STRONG&gt;&lt;BR /&gt;FROM Child_Account;&lt;/P&gt;&lt;P&gt;Temp:&lt;BR /&gt;Load Distinct Parent_Account_vod__c&amp;amp;'|'&amp;amp;Child_Account_vod__c as Key&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;Bridge:&lt;/P&gt;&lt;P&gt;Load distinct&lt;BR /&gt;Key,&lt;/P&gt;&lt;P&gt;Parent_Account_vod__c as AccountID&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;Concatenate&lt;/P&gt;&lt;P&gt;Load Distinct&lt;BR /&gt;Key,&lt;/P&gt;&lt;P&gt;Child_Account_vod__c as AccountID;&lt;/P&gt;&lt;P&gt;LOAD Name as CallID,&lt;BR /&gt;AccountID,&lt;BR /&gt;Call_Date,&lt;BR /&gt;Detailed_Products,,&lt;BR /&gt;Year(Call_Date_) as Year&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;SELECT Name,&lt;BR /&gt;AccountID,&lt;BR /&gt;Call_Date,&lt;BR /&gt;Detailed_Products&lt;BR /&gt;FROM Call2_Details;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;both child account and parent account had calls and I am trying to get call details for both by connecting them to call_details ID&lt;/P&gt;</description>
      <pubDate>Fri, 29 Jan 2021 18:17:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/create-2-tables-from-one/m-p/1778545#M718097</guid>
      <dc:creator>garyk22</dc:creator>
      <dc:date>2021-01-29T18:17:46Z</dc:date>
    </item>
    <item>
      <title>Re: create 2 tables from one</title>
      <link>https://community.qlik.com/t5/QlikView/create-2-tables-from-one/m-p/1778555#M718098</link>
      <description>&lt;P&gt;this is the part that creates the bridge:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;RELATIONSHIP:&lt;BR /&gt;LOAD PARENTID,&lt;BR /&gt;ChildID,&lt;BR /&gt;PARENTID &amp;amp;'|'&amp;amp; ChildID as IDs&lt;BR /&gt;inline [&amp;nbsp; &amp;nbsp;//you replace this section with your load and add what fields you need&lt;BR /&gt;PARENTID,ChildID&lt;BR /&gt;ACCT1, ACCT2&lt;BR /&gt;ACCT1, ACCT3&lt;BR /&gt;ACCT4,ACCT5&lt;BR /&gt;ACCT0, ACCT1&lt;BR /&gt;ACCT0, ACCT4&lt;BR /&gt;];&lt;/P&gt;&lt;P&gt;NoConcatenate&lt;BR /&gt;Temp:&lt;BR /&gt;Load Distinct IDS, PARENTID,ChildID&lt;BR /&gt;resident RELATIONSHIP&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;NoConcatenate&lt;BR /&gt;Bridge:&lt;/P&gt;&lt;P&gt;Load distinct&lt;BR /&gt;IDs,&lt;BR /&gt;PARENTID as AccountID,&lt;BR /&gt;'PARENT' as DataType&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;Concatenate (Bridge)&lt;BR /&gt;Load distinct&lt;BR /&gt;IDs,&lt;BR /&gt;ChildID as AccountID,&lt;BR /&gt;'CHILD' as DataType&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;drop table Temp;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Jan 2021 18:47:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/create-2-tables-from-one/m-p/1778555#M718098</guid>
      <dc:creator>edwin</dc:creator>
      <dc:date>2021-01-29T18:47:58Z</dc:date>
    </item>
    <item>
      <title>Re: create 2 tables from one</title>
      <link>https://community.qlik.com/t5/QlikView/create-2-tables-from-one/m-p/1778561#M718099</link>
      <description>&lt;P&gt;this one i tested:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;RELATIONSHIP:
LOAD PARENTID,
ChildID,
PARENTID &amp;amp;'|'&amp;amp; ChildID as IDs
inline [
PARENTID,ChildID
ACCT1, ACCT2
ACCT1, ACCT3
ACCT4,ACCT5
ACCT0, ACCT1
ACCT0, ACCT4
];

NoConcatenate
Temp:
Load Distinct  IDs, PARENTID,ChildID
resident RELATIONSHIP
;

NoConcatenate
Bridge:
Load distinct
IDs,
PARENTID as AccountID,
'PARENT' as DataType
resident Temp
;

Concatenate (Bridge)
Load distinct
IDs,
ChildID as AccountID,
'CHILD' as DataType
;

drop table Temp;&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 29 Jan 2021 18:55:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/create-2-tables-from-one/m-p/1778561#M718099</guid>
      <dc:creator>edwin</dc:creator>
      <dc:date>2021-01-29T18:55:02Z</dc:date>
    </item>
  </channel>
</rss>

