Forum Discussion

Kaskazi_Network's avatar
5 years ago
Solved

Relationship between two Tables

Hi all,

So I have two tables, 'Outlets Table' and 'Customer/Distributor Table' as shown in the dummy tables below. I need to create a relationship betwen the two tables so that I can show Comparison in number of outlets and number of customers for each distributor in a single visual. Kindly, advise how I can relate the two tables and achieve the above.

 

Any feedback will be highly appreciated, thanks.

Outlets Table
Outlet IDOutlet NameDistributor CodeDistributor name
111Outlet A1DIST A
112Outlet B2DIST B
113Outlet C2DIST B
114Outlet D3DIST C
115Outlet E3DIST C
116Outlet F1DIST A
Customer/Distributor Table
Customer CodeCustomer NameDistributor Code
UG347Customer12
KE328Customer23
TZ782Customer33
ET328Customer41
CM237Customer52
  • Anonymous's avatar
    Anonymous
    5 years ago

    Hi Kaskazi_Network ,

     

    Based on your description, you can do some steps as follows.

    1. Create a many-to-many relationship between two tables.

     

    1. Create a table visual. (Choose “count(distinct)”)

     

    Result:

     

    Hope that's what you were looking for.

    Best Regards,

    Yuna

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

2 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Kaskazi_Network ,

     

    Based on your description, you can do some steps as follows.

    1. Create a many-to-many relationship between two tables.

     

    1. Create a table visual. (Choose “count(distinct)”)

     

    Result:

     

    Hope that's what you were looking for.

    Best Regards,

    Yuna

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.