Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Dataset Relationship Issues

Hello together,   I have a small problem and hope you can help me. Surely this is quite simple and I just do not get it.   So I have to two datasets. One has the information about ordered amounts...
  • TomMartens's avatar
    TomMartens
    4 years ago

    Hey Anonymous ,

    based on the sample data (Table A and Table B) I created a little sample pbix file, see attachment.

    I used this DAX statement to create a third table Customer:

    Customer = 
    DISTINCT(
        UNION(
            ALLNOBLANKROW( 'Table A'[Customer] )
            , ALLNOBLANKROW( 'Table B'[Customer] )
        )
    )

    Then I created relationships like below:

    This allows to create a simple data visualization like the one below:


    If you are using Power Query to create the Customer table, you have to make sure that each Customer appears just once in the Customer table.

    Hopefully, this helps to tackle your challenge.

     

    Regards,

    Tom