2 Replies Latest reply: Jul 30, 2014 2:23 PM by Oswaldo Vasquez RSS

    fact ,dimension

      in qlikview

      2 fact tables are combined by link table.......

      but how to combine fact ,dimension table if we have common field?

      ANS:

      how to combine fact ,dimension table if we have no common field?

      ANS:

      how to combine dimension tables?

        • Re: fact ,dimension

          Hi,

          Link table is used to remove synthetic keys.

          And we combine tables using concatenation in case of common fields and forced concatenation in case of uncommon fields.

          • Re: fact ,dimension

            Hi,

             

            I suggest concatenate two fact tables to keep simple and associate dimension tables by field.

             

            Example:

             

            Sales:

            Employee | Product | Date      | InvoiceID | Amount

            1                    a        07/30/2014     1               100

            2                    a        07/15/2014     2               130

            3                    b        07/21/2014     3                54

             

            Orders:

            OrderID | Product | Date           |  Quantity

            1               b           06/30/2014          10

            2               c           06/03/2014           5

            3               a           07/30/2014          30

             

             

            Concatenate table result:

             

            Fact:

            Employee | Product | Date      | InvoiceID | Amount  |  OrderId | Quantity

            1                    a        07/30/2014     1               100

            2                    a        07/15/2014     2               130

            3                    b        07/21/2014     3                54

                                  b        06/30/2014                                    1                   10

                                  c        06/03/2014                                    2                   5

                                  a        07/30/2014                                    3                   30

             

            So if you select Product "a" (Common Dimension Field) you get data for Sales and Orders:

             

            Fact:

            Employee | Product | Date      | InvoiceID | Amount  |  OrderId | Quantity

            1                    a        07/30/2014     1               100

            2                    a        07/15/2014     2               130

                                  a        07/30/2014                                    3                   30

             

            Sales = 230

            Quantity = 30

             

            Best Regards.