<?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: 1 fact table twice linking to 1 dimension in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/1-fact-table-twice-linking-to-1-dimension/m-p/337504#M703957</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Bart,&lt;/P&gt;&lt;P&gt;see file attached.&lt;/P&gt;&lt;P&gt;Hope it helps.&lt;/P&gt;&lt;P&gt;Giampiero&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 06 Jun 2012 13:53:18 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-06-06T13:53:18Z</dc:date>
    <item>
      <title>1 fact table twice linking to 1 dimension</title>
      <link>https://community.qlik.com/t5/QlikView/1-fact-table-twice-linking-to-1-dimension/m-p/337499#M703952</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is the situation:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I got 1 table containing transactions between parties.&lt;/P&gt;&lt;P&gt;One party being the sender of the transactions, the other party being the receiver of the transaction.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The senders and receivers of transactions are stored in one table, called parties.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;using Qlikview I want to get a view on the following kinds of information:&lt;/P&gt;&lt;P&gt;- to who (receivers) is a sender sending transactions?&lt;/P&gt;&lt;P&gt;- from who (senders) is a receiver receiving transactions?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If these were the only questions to be answered, I could easily load the parties twice, but as a party can be a sender as well as a receiver in my model, I want to get both questions above answered in one time selecting only once the name of the party.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In a simplified relational model, this is very simple, but I cannot reproduce this in qlikview as I would have to deal with circular references.&lt;/P&gt;&lt;P&gt;And in this case I have no idea what could be the ideal solution.&lt;IMG alt="Transaction_party.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/15475_Transaction_party.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All help is well appreciated!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Bart&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Jun 2012 10:11:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/1-fact-table-twice-linking-to-1-dimension/m-p/337499#M703952</guid>
      <dc:creator />
      <dc:date>2012-06-05T10:11:15Z</dc:date>
    </item>
    <item>
      <title>1 fact table twice linking to 1 dimension</title>
      <link>https://community.qlik.com/t5/QlikView/1-fact-table-twice-linking-to-1-dimension/m-p/337500#M703953</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;Why don't you split your Party table into Sender and Receiver? and then join each table with teh right key...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Jun 2012 10:28:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/1-fact-table-twice-linking-to-1-dimension/m-p/337500#M703953</guid>
      <dc:creator>jvitantonio</dc:creator>
      <dc:date>2012-06-05T10:28:27Z</dc:date>
    </item>
    <item>
      <title>Re: 1 fact table twice linking to 1 dimension</title>
      <link>https://community.qlik.com/t5/QlikView/1-fact-table-twice-linking-to-1-dimension/m-p/337501#M703954</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Bart&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The way to handle this is to use mapping rather than a join. First do a mapping load of the Party table:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Party_Map:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Mapping Load * From Party;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then use ApplyMap to load the names from the IDs directly into the main table:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Data:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;LOAD TransactionID,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sender_ID,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Applymap('Party_Map', Sender_ID) As Sender_Name,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Applymap('Party_Map', Receiver_ID) As Receiver_Name&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;FROM Transaction;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The mapping table will be automatically dropped at the end of the load, so there are no joins, loops or synthetic keys.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Jun 2012 10:34:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/1-fact-table-twice-linking-to-1-dimension/m-p/337501#M703954</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2012-06-05T10:34:49Z</dc:date>
    </item>
    <item>
      <title>1 fact table twice linking to 1 dimension</title>
      <link>https://community.qlik.com/t5/QlikView/1-fact-table-twice-linking-to-1-dimension/m-p/337502#M703955</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;there are two reasons why I think the applymap functionality won't work:&lt;/P&gt;&lt;P&gt;1. This is a simplified representation of my Party dimension. In real it contains more attributes.&lt;/P&gt;&lt;P&gt;2. If I do this, then it won't be possible to have one view in which I can see&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - to who a party is sending transactions&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - from who that same party is receiving transactions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Suppose I have following data:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" cellpadding="0" cellspacing="0" class="jiveBorder" style="width: 251px; border-color: rgb(0, 0, 0); border-style: solid; border-width: 1px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl63" height="20" width="71"&gt;Sender_ID&lt;/TD&gt;&lt;TD class="xl63" style="border-left: medium none;" width="81"&gt;Receiver_ID&lt;/TD&gt;&lt;TD class="xl63" style="border-left: medium none;" width="99"&gt;Transaction_ID&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="20" style="border-top: medium none;"&gt;A&lt;/TD&gt;&lt;TD class="xl63" style="border-top: medium none; border-left: medium none;"&gt;B&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: medium none; border-left: medium none;"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="20" style="border-top: medium none;"&gt;A&lt;/TD&gt;&lt;TD class="xl63" style="border-top: medium none; border-left: medium none;"&gt;C&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: medium none; border-left: medium none;"&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="20" style="border-top: medium none;"&gt;A&lt;/TD&gt;&lt;TD class="xl63" style="border-top: medium none; border-left: medium none;"&gt;B&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: medium none; border-left: medium none;"&gt;3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="20" style="border-top: medium none;"&gt;B&lt;/TD&gt;&lt;TD class="xl63" style="border-top: medium none; border-left: medium none;"&gt;D&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: medium none; border-left: medium none;"&gt;4&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="20" style="border-top: medium none;"&gt;B&lt;/TD&gt;&lt;TD class="xl63" style="border-top: medium none; border-left: medium none;"&gt;D&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: medium none; border-left: medium none;"&gt;5&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="20" style="border-top: medium none;"&gt;B&lt;/TD&gt;&lt;TD class="xl63" style="border-top: medium none; border-left: medium none;"&gt;C&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: medium none; border-left: medium none;"&gt;6&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;TABLE border="1" cellpadding="0" cellspacing="0" class="jiveBorder" style="width: 152px; border-color: rgb(0, 0, 0); border-style: solid; border-width: 1px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl65" height="20" width="71"&gt;Party_ID&lt;/TD&gt;&lt;TD class="xl65" style="border-left: medium none;" width="81"&gt;Name&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="20" style="border-top: medium none;"&gt;A&lt;/TD&gt;&lt;TD class="xl65" style="border-top: medium none; border-left: medium none;"&gt;Company_A&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="20" style="border-top: medium none;"&gt;B&lt;/TD&gt;&lt;TD class="xl65" style="border-top: medium none; border-left: medium none;"&gt;Company_B&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="20" style="border-top: medium none;"&gt;C&lt;/TD&gt;&lt;TD class="xl65" style="border-top: medium none; border-left: medium none;"&gt;Company_C&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="20" style="border-top: medium none;"&gt;D&lt;/TD&gt;&lt;TD class="xl65" style="border-top: medium none; border-left: medium none;"&gt;Company_D&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;At the end, if I select 'Company_B' in my dashboard, I would like to see that:&lt;/P&gt;&lt;P&gt;- Company_B has sent 2 transactions to Company_D and 1 transaction to Company_C&lt;/P&gt;&lt;P&gt;- Company_B has received 2 transactions from Company_A&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I perform the applymap functionality, then I would have to search twice.&lt;/P&gt;&lt;P&gt;Once selecting Company_B as the sender, once selecting Company_B as the receiver.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or am I wrong?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Jun 2012 12:18:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/1-fact-table-twice-linking-to-1-dimension/m-p/337502#M703955</guid>
      <dc:creator />
      <dc:date>2012-06-05T12:18:22Z</dc:date>
    </item>
    <item>
      <title>Re: 1 fact table twice linking to 1 dimension</title>
      <link>https://community.qlik.com/t5/QlikView/1-fact-table-twice-linking-to-1-dimension/m-p/337503#M703956</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Bart&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I you need to bring in more attributes, you could use applymap again (if there are say 2 or 3 more). If there are too many, then you would have to create two Party tables, one for Sender and one for Receiver.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For your "2 way" query - you can build a data island (ie not linked to anything) containing fields Party_ID, PartyName; and then create a straight table object that shows two expressions:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;STRONG&gt;Received From:&lt;/STRONG&gt; one using set expression like {&amp;lt;Receiver_ID=P(Party_ID)&amp;gt;} ..ie any sender, receiver based on Party_ID selection)&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;Sent By&lt;/STRONG&gt;: nd one showing {&amp;lt;Sender_ID=P(Party_ID)&amp;gt;} .. ie any receiver (sender will be based on Party_ID selection)&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and a list box showing PartyName.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Jun 2012 13:12:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/1-fact-table-twice-linking-to-1-dimension/m-p/337503#M703956</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2012-06-05T13:12:04Z</dc:date>
    </item>
    <item>
      <title>Re: 1 fact table twice linking to 1 dimension</title>
      <link>https://community.qlik.com/t5/QlikView/1-fact-table-twice-linking-to-1-dimension/m-p/337504#M703957</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Bart,&lt;/P&gt;&lt;P&gt;see file attached.&lt;/P&gt;&lt;P&gt;Hope it helps.&lt;/P&gt;&lt;P&gt;Giampiero&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Jun 2012 13:53:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/1-fact-table-twice-linking-to-1-dimension/m-p/337504#M703957</guid>
      <dc:creator />
      <dc:date>2012-06-06T13:53:18Z</dc:date>
    </item>
    <item>
      <title>1 fact table twice linking to 1 dimension</title>
      <link>https://community.qlik.com/t5/QlikView/1-fact-table-twice-linking-to-1-dimension/m-p/337505#M703958</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Load Party twice (concatenated)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Party:&lt;/P&gt;&lt;P&gt;LOAD fieldlist, Party_ID as Sender_ID, 'Sender' as PartyType;&lt;/P&gt;&lt;P&gt;SQL SELECT * FROM PartyTable;&lt;/P&gt;&lt;P&gt;CONCATENATE &lt;/P&gt;&lt;P&gt;LOAD fieldlist, Party_ID as Receiver_ID, 'Receiver' as PartyType;&lt;/P&gt;&lt;P&gt;SQL SELECT * FROM PartyTable;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Jun 2012 18:47:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/1-fact-table-twice-linking-to-1-dimension/m-p/337505#M703958</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2012-06-06T18:47:38Z</dc:date>
    </item>
  </channel>
</rss>

