<?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: Link table Sales - Bugdet - Item table. in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Link-table-Sales-Bugdet-Item-table/m-p/1353349#M415580</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Omar, if the MasterItemTable doesn't have any metric or many to many relationship that justifies having them in a separate table, joining them in the transactions table will give a simpler model where you can you join directly transactions and budget using Store, Category and Date as a key.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;About the current script, if the rows are just concatenated there is no row that makes the relations, you'll need to join by the key fields, so the related composite keys ends in the same row.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 09 Jul 2017 16:58:56 GMT</pubDate>
    <dc:creator>rubenmarin</dc:creator>
    <dc:date>2017-07-09T16:58:56Z</dc:date>
    <item>
      <title>Link table Sales - Bugdet - Item table.</title>
      <link>https://community.qlik.com/t5/QlikView/Link-table-Sales-Bugdet-Item-table/m-p/1353348#M415579</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i have 3 table:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Budget table, which contain&lt;/P&gt;&lt;P&gt;StoreNo, Date,&amp;nbsp; ItemCat, Budget Amount&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Item Table.&lt;/P&gt;&lt;P&gt;Item No. ItemCat&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sales Trans Table:&lt;/P&gt;&lt;P&gt;Date, Store, Item No.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now, i'm trying to build a link table where i can see budget for all Item Cat even if there is no sales for this item on a day from a store.&lt;/P&gt;&lt;P&gt;any idea?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i tried with this model, as below, but i didnt work, as the key to link budget and Trans, is not happening.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/169547_Capture.PNG" style="height: 225px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this is what i did.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Stage1:&lt;/P&gt;&lt;P&gt;Load Distinct&lt;/P&gt;&lt;P&gt;&amp;nbsp; Store &lt;/P&gt;&lt;P&gt;&amp;nbsp; ,'Transaction' AS TableFlag&lt;/P&gt;&lt;P&gt;&amp;nbsp; ,ItemKey&lt;/P&gt;&lt;P&gt;&amp;nbsp; ,[Date]&lt;/P&gt;&lt;P&gt;&amp;nbsp; ,[Transaction No_]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Resident Transaction ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Concatenate&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;load&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; BudgetHFB as HFBNo,&lt;/P&gt;&lt;P&gt;&amp;nbsp; 'Budget' AS TableFlag,&lt;/P&gt;&lt;P&gt;&amp;nbsp; Store,&lt;/P&gt;&lt;P&gt;&amp;nbsp; BudgetDate as Date&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Resident Budget;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Concatenate&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; ItemKey&lt;/P&gt;&lt;P&gt;&amp;nbsp; ,'Item' AS TableFlag&lt;/P&gt;&lt;P&gt;&amp;nbsp; ,if(left([Home Furnishing Business No_],1)='0',right([Home Furnishing Business No_],1),[Home Furnishing Business No_]) as HFBNo&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Resident MasterItemTable;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Link:&lt;/P&gt;&lt;P&gt;Load &lt;/P&gt;&lt;P&gt;&amp;nbsp; *&lt;/P&gt;&lt;P&gt;&amp;nbsp; ,Store &amp;amp; '-' &amp;amp; HFBNo &amp;amp; '|' &amp;amp;&amp;nbsp; Num(Date) AS BudgetKey&lt;/P&gt;&lt;P&gt;&amp;nbsp; ,Store &amp;amp; '|' &amp;amp; ItemKey &amp;amp; '|' &amp;amp;[Date]&amp;amp; '|' &amp;amp; [Transaction No_] AS TransactionKey,&lt;/P&gt;&lt;P&gt;&amp;nbsp; HFBNo &amp;amp; '|' &amp;amp; ItemKey as HFB_ItemKey&lt;/P&gt;&lt;P&gt;Resident Stage1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DROP Table Stage1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;drop Field Store ,ItemKey ,[Date] ,[Transaction No_] from Transaction;&lt;/P&gt;&lt;P&gt;drop Field&amp;nbsp; BudgetHFB, Store, BudgetDate from Budget;&lt;/P&gt;&lt;P&gt;Drop field ItemKey from MasterItemTable;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks for your support.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 09 Jul 2017 11:47:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Link-table-Sales-Bugdet-Item-table/m-p/1353348#M415579</guid>
      <dc:creator />
      <dc:date>2017-07-09T11:47:27Z</dc:date>
    </item>
    <item>
      <title>Re: Link table Sales - Bugdet - Item table.</title>
      <link>https://community.qlik.com/t5/QlikView/Link-table-Sales-Bugdet-Item-table/m-p/1353349#M415580</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Omar, if the MasterItemTable doesn't have any metric or many to many relationship that justifies having them in a separate table, joining them in the transactions table will give a simpler model where you can you join directly transactions and budget using Store, Category and Date as a key.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;About the current script, if the rows are just concatenated there is no row that makes the relations, you'll need to join by the key fields, so the related composite keys ends in the same row.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 09 Jul 2017 16:58:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Link-table-Sales-Bugdet-Item-table/m-p/1353349#M415580</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2017-07-09T16:58:56Z</dc:date>
    </item>
  </channel>
</rss>

