Forum Discussion

Oros's avatar
Oros
Post Prodigy
2 years ago
Solved

Relate tables

Hello,

 

I have 3 tables (DOLLAR and QTY tables are related with the third table PRODUCT).

 

The DOLLAR and QTY columns are correct, but as soon as I bring in the CUSTOMER column the QTY for each customer always shows the TOTAL QTY for all customers.  How do I relate the CUSTOMER from the 2 tables?  Thanks.

 

Here is the sample pbix:

SAMPLE pbix

 

Here are the screenshots:

(this is correct)

 

(when CUSTOMER is added, the  QTY is NOT correct)

highlighted in green is correct

(QTY duplicated per line)

 

 

 

  • Hi,

    Create a single column table of all unique customers.  Create a Many to One relationship from the Qty and Dollar Table to the Customer Table.  To your visual, drag Customer from the Customer Table.

    Hope this helps.

10 Replies

    • Oros's avatar
      Oros
      Post Prodigy

      Hi aj1973 ,

       

      Thank you for your quick reply.  I changed the relationship as you indicated.  But it looks like only the total is correct. COuld it be because the CUSTOMER from the DOLLAR and QTY tables must also be related?  Thanks again.

       

      The QTY lines are duplicated and do not equal the total qty of 2,165.38.

      The matrix table is also not correct because of duplicated QTY.

       

      In Excel Pivot Table, this are the correct numbers.

       

       

       

       

       

      • aj1973's avatar
        aj1973
        Community Champion

        Oros New Update:

         

        Use CUSTOMER from the DOLLAR Table instead

         

         

        And Use Product from the Dollar Table

         

  • Hi,

    Create a single column table of all unique customers.  Create a Many to One relationship from the Qty and Dollar Table to the Customer Table.  To your visual, drag Customer from the Customer Table.

    Hope this helps.