<?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: 2 Fields from Fact Table refer to 1 field in Dimension Table in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/2-Fields-from-Fact-Table-refer-to-1-field-in-Dimension-Table/m-p/1528553#M438584</link>
    <description>&lt;P&gt;Your&amp;nbsp;TCC dimension is what is referred to as a "Role Playing" dimension., like multiple dates in a fact table (Ex. Quote Date, Order Date, Ship Date, Payment Date, etc)&amp;nbsp; You have 2 choices:&lt;/P&gt;&lt;P&gt;1.&amp;nbsp; in qlik script, create 2 dimensions TCC1 and TCC2,&amp;nbsp;This allow users to make&amp;nbsp; independent selection on either.&amp;nbsp; This is the simplest method, but requires 2 selection filters.&amp;nbsp; The disadvantage is that you cannot capitalize on the use of set analysis.&lt;/P&gt;&lt;P&gt;2.&amp;nbsp; Create a single TCC dimension, and a "link table", which as a key of : autonumber(Fact.tcc1 &amp;amp; '|' &amp;amp;&amp;nbsp; &lt;SPAN&gt;Fact.tcc2&lt;/SPAN&gt;) as TccLinkKey.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Its final structure will be:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;TccLinkKey&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;TCC Code&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;TCC Description&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;TCC1Flag (1=true, 0=false)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;TCC2Flag (1=true, 0=false)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;The above single dimension allows you to have a single dimension for users to filter on.&amp;nbsp; However, you will need to use set analysis for your measures.&amp;nbsp; For me this is a blessing, for some it is a curse.&lt;/P&gt;&lt;P&gt;Ex:&amp;nbsp; Count of Patients (TCC1) = Count({$&amp;lt;&lt;SPAN&gt;TCC1&lt;/SPAN&gt;&lt;SPAN&gt;Flag={1}&lt;/SPAN&gt;&amp;gt;}Distinct PatientID)&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Ex:&amp;nbsp; Count of Patients (&lt;/SPAN&gt;&lt;SPAN&gt;TCC2) = Count&lt;/SPAN&gt;&lt;SPAN&gt;({$&amp;lt;&lt;/SPAN&gt;&lt;SPAN&gt;TCC2&lt;/SPAN&gt;&lt;SPAN&gt;Flag={1}&lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt;}&lt;/SPAN&gt;&lt;SPAN&gt;Distinct PatientID&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I do this all the time with a master calendfar and a master calendar link table&lt;/P&gt;&lt;P&gt;Dave&lt;/P&gt;</description>
    <pubDate>Wed, 09 Jan 2019 17:26:44 GMT</pubDate>
    <dc:creator>dadumas</dc:creator>
    <dc:date>2019-01-09T17:26:44Z</dc:date>
    <item>
      <title>2 Fields from Fact Table refer to 1 field in Dimension Table</title>
      <link>https://community.qlik.com/t5/QlikView/2-Fields-from-Fact-Table-refer-to-1-field-in-Dimension-Table/m-p/1528296#M438568</link>
      <description>&lt;P&gt;Hey!&amp;nbsp;&lt;BR /&gt;I am currently working on a problem I cannot find a real solution to.&lt;BR /&gt;&lt;BR /&gt;I have one real big Fact Table and some Dimension Tables to refer to.&lt;BR /&gt;&lt;BR /&gt;Basically my Fact table looks like this:&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Patient ID&lt;/TD&gt;&lt;TD&gt;TCC&amp;nbsp;1&lt;/TD&gt;&lt;TD&gt;TCC&amp;nbsp;2&lt;/TD&gt;&lt;TD&gt;Many other columns&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;287&lt;/TD&gt;&lt;TD&gt;Other Data&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;271&lt;/TD&gt;&lt;TD&gt;271&lt;/TD&gt;&lt;TD&gt;Other Data&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;899&lt;/TD&gt;&lt;TD&gt;724&lt;/TD&gt;&lt;TD&gt;Other Data&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;BR /&gt;(Patient ID from 1 to 50,000)&lt;/P&gt;&lt;P&gt;And a Dimension Table that looks like this:&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;TCC&amp;nbsp;ID&lt;/TD&gt;&lt;TD&gt;TCC&amp;nbsp;Text&lt;/TD&gt;&lt;TD&gt;TCC&amp;nbsp;XXX&lt;/TD&gt;&lt;TD&gt;Many other Columns&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;Text&lt;/TD&gt;&lt;TD&gt;XXX&lt;/TD&gt;&lt;TD&gt;Other Data&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;Text&lt;/TD&gt;&lt;TD&gt;XXX&lt;/TD&gt;&lt;TD&gt;Other Data&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;BR /&gt;(TCC ID from 1 to 10,000)&lt;/P&gt;&lt;P&gt;I need&amp;nbsp;both, TCC 1 and TCC 2, to refer to the&amp;nbsp;TCC ID. But I simply dont know how to.&lt;BR /&gt;Later on Ive got a similar problem with other fields that refer to the same field in a dimension table.&lt;BR /&gt;&lt;BR /&gt;Hope you can help me out.&amp;nbsp;&lt;BR /&gt;Thanks!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 21:38:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/2-Fields-from-Fact-Table-refer-to-1-field-in-Dimension-Table/m-p/1528296#M438568</guid>
      <dc:creator>Malle</dc:creator>
      <dc:date>2024-11-16T21:38:02Z</dc:date>
    </item>
    <item>
      <title>Re: 2 Fields from Fact Table refer to 1 field in Dimension Table</title>
      <link>https://community.qlik.com/t5/QlikView/2-Fields-from-Fact-Table-refer-to-1-field-in-Dimension-Table/m-p/1528309#M438570</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;You need an interval match to get the relation between begin and end ID with you dimension table&lt;/P&gt;</description>
      <pubDate>Wed, 09 Jan 2019 11:37:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/2-Fields-from-Fact-Table-refer-to-1-field-in-Dimension-Table/m-p/1528309#M438570</guid>
      <dc:creator>albert_guito</dc:creator>
      <dc:date>2019-01-09T11:37:54Z</dc:date>
    </item>
    <item>
      <title>Re: 2 Fields from Fact Table refer to 1 field in Dimension Table</title>
      <link>https://community.qlik.com/t5/QlikView/2-Fields-from-Fact-Table-refer-to-1-field-in-Dimension-Table/m-p/1528372#M438574</link>
      <description>&lt;P&gt;How would I do that? I don't really have intervalls, just two field pointing at the same field in the other table.&lt;/P&gt;</description>
      <pubDate>Wed, 09 Jan 2019 13:11:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/2-Fields-from-Fact-Table-refer-to-1-field-in-Dimension-Table/m-p/1528372#M438574</guid>
      <dc:creator>Malle</dc:creator>
      <dc:date>2019-01-09T13:11:18Z</dc:date>
    </item>
    <item>
      <title>Re: 2 Fields from Fact Table refer to 1 field in Dimension Table</title>
      <link>https://community.qlik.com/t5/QlikView/2-Fields-from-Fact-Table-refer-to-1-field-in-Dimension-Table/m-p/1528422#M438578</link>
      <description>Why dont you move the tcc's into another table? which would have 2 rows&lt;BR /&gt;i.e. new table would be patientid tccid&lt;BR /&gt;and 1 patient would have 2 rows here&lt;BR /&gt;Makes it slightly snowflakey but reasonable compromise</description>
      <pubDate>Wed, 09 Jan 2019 14:26:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/2-Fields-from-Fact-Table-refer-to-1-field-in-Dimension-Table/m-p/1528422#M438578</guid>
      <dc:creator>dplr-rn</dc:creator>
      <dc:date>2019-01-09T14:26:35Z</dc:date>
    </item>
    <item>
      <title>Re: 2 Fields from Fact Table refer to 1 field in Dimension Table</title>
      <link>https://community.qlik.com/t5/QlikView/2-Fields-from-Fact-Table-refer-to-1-field-in-Dimension-Table/m-p/1528553#M438584</link>
      <description>&lt;P&gt;Your&amp;nbsp;TCC dimension is what is referred to as a "Role Playing" dimension., like multiple dates in a fact table (Ex. Quote Date, Order Date, Ship Date, Payment Date, etc)&amp;nbsp; You have 2 choices:&lt;/P&gt;&lt;P&gt;1.&amp;nbsp; in qlik script, create 2 dimensions TCC1 and TCC2,&amp;nbsp;This allow users to make&amp;nbsp; independent selection on either.&amp;nbsp; This is the simplest method, but requires 2 selection filters.&amp;nbsp; The disadvantage is that you cannot capitalize on the use of set analysis.&lt;/P&gt;&lt;P&gt;2.&amp;nbsp; Create a single TCC dimension, and a "link table", which as a key of : autonumber(Fact.tcc1 &amp;amp; '|' &amp;amp;&amp;nbsp; &lt;SPAN&gt;Fact.tcc2&lt;/SPAN&gt;) as TccLinkKey.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Its final structure will be:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;TccLinkKey&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;TCC Code&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;TCC Description&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;TCC1Flag (1=true, 0=false)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;TCC2Flag (1=true, 0=false)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;The above single dimension allows you to have a single dimension for users to filter on.&amp;nbsp; However, you will need to use set analysis for your measures.&amp;nbsp; For me this is a blessing, for some it is a curse.&lt;/P&gt;&lt;P&gt;Ex:&amp;nbsp; Count of Patients (TCC1) = Count({$&amp;lt;&lt;SPAN&gt;TCC1&lt;/SPAN&gt;&lt;SPAN&gt;Flag={1}&lt;/SPAN&gt;&amp;gt;}Distinct PatientID)&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Ex:&amp;nbsp; Count of Patients (&lt;/SPAN&gt;&lt;SPAN&gt;TCC2) = Count&lt;/SPAN&gt;&lt;SPAN&gt;({$&amp;lt;&lt;/SPAN&gt;&lt;SPAN&gt;TCC2&lt;/SPAN&gt;&lt;SPAN&gt;Flag={1}&lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt;}&lt;/SPAN&gt;&lt;SPAN&gt;Distinct PatientID&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I do this all the time with a master calendfar and a master calendar link table&lt;/P&gt;&lt;P&gt;Dave&lt;/P&gt;</description>
      <pubDate>Wed, 09 Jan 2019 17:26:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/2-Fields-from-Fact-Table-refer-to-1-field-in-Dimension-Table/m-p/1528553#M438584</guid>
      <dc:creator>dadumas</dc:creator>
      <dc:date>2019-01-09T17:26:44Z</dc:date>
    </item>
    <item>
      <title>Re: 2 Fields from Fact Table refer to 1 field in Dimension Table</title>
      <link>https://community.qlik.com/t5/QlikView/2-Fields-from-Fact-Table-refer-to-1-field-in-Dimension-Table/m-p/1528555#M438586</link>
      <description>Did not explain well enough. You will also need the TCCDIM dimension:&lt;BR /&gt;TCC Code&lt;BR /&gt;TCC Description&lt;BR /&gt;....&lt;BR /&gt;&lt;BR /&gt;TCC Description would not exist in the link table.</description>
      <pubDate>Wed, 09 Jan 2019 17:30:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/2-Fields-from-Fact-Table-refer-to-1-field-in-Dimension-Table/m-p/1528555#M438586</guid>
      <dc:creator>dadumas</dc:creator>
      <dc:date>2019-01-09T17:30:50Z</dc:date>
    </item>
  </channel>
</rss>

