6 Replies Latest reply: May 20, 2016 10:26 AM by Marquez Zamora RSS

    3 Tables  Realtionship with Non-Unique Keys

    Marquez Zamora

      Hi there

       

                I have an relationship problem that cannot solve yet.

       

                The very simple example is this one:

       

                Fact Table:

                Employee,

                Country,

                State,

                Town;

       

                Town_table:

                TownID,

                StateID,

                CountryID,

                Desc_Town;

       

                State_Table:

                StateID,

                CountryID,

                Desc_State;

               

                Country_Table:

                CountryID,

                Desc_Country;

       

      When I try to join the tables everything seems to be fine, but the real problem comes when on a Straight Table I put the

      Desc_State as Dimension and the Count of employees as Expression.

       

      The count of every state takes all the global data , this happens because the TownID it´s  an sequence wich repeats on every change of StateID or CountryID.

       

       

      TownStateCountry
      111
      121
      221
      131
      112

       

       

      What´s the correct way to join the tables?, Im really  stucked here.

       

      Thanks in advance!