14 Replies Latest reply: Mar 16, 2018 3:29 PM by Youssef Belloum RSS

    Qlik Sense unique dimension key

    Christoph Albrecht

      Hi All,

       

      in Qlik View there are "Perfect Keys". Is there a same concept in Qlik Sense? Should I also use "perfect keys" e.g. as dimension keys? From performance point of view, is there any difference if you have unique 1:1 or 1:n dimension keys?

       

      I ask because there is the following problem:

       

      FactTable:

       

      Event TimestampStatusDimKey
      2016-01-01 01:00:00ax
      2016-01-01 01:00:01ay
      2016-01-01 01:00:02bx
      2016-01-01 01:00:03ax
      2016-01-01 01:00:04by
      2016-01-01 01:00:05cz


      StatusDimTable:


      StatusDimKeyStatusIdStatusValue
      axaax1
      axaax2
      axaax3
      ayaay1
      bxbbx1
      bxbbx2
      bybby1
      bybby2
      czccz1
      czccz2
      czccz3

       

      The problem here is, each StatusKey can have multiple StatusValues for a specific StatusId. Is it a problem to have not unique dimension keys (StatusDimKey)?

       

      Or should I do the following with the fact table?

       

      NewFactTable1:


      Event TimestampStatusDimKey
      2016-01-01 01:00:00ax1
      2016-01-01 01:00:00ax2
      2016-01-01 01:00:00ax3
      2016-01-01 01:00:01ay1
      2016-01-01 01:00:02bx1
      2016-01-01 01:00:02bx2
      2016-01-01 01:00:03ax1
      2016-01-01 01:00:03ax2
      2016-01-01 01:00:03ax3
      2016-01-01 01:00:04by1
      2016-01-01 01:00:04by2
      2016-01-01 01:00:05cz1
      2016-01-01 01:00:05cz2
      2016-01-01 01:00:05cz3

       

      That causes a lot more rows in the fact table.