Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Relationships between 2 tables without unique column values

Hi   Got 2 tables: Receipt_Headers and Receipt_Payment. These 2 tables have 3 columns in common: RCP_Date, Receipt_ID and Amount. I get most of the data I need from Receipt_Headers but I have to a...
  • Greg_Deckler's avatar
    5 years ago

    Anonymous - I'm with nandic on this one, a composite key seems like the way to go, I like to create my composite keys like this:

    Key = [Column1] & "|" & [Column 2] & "|" & [Column3]

    I always use a seperator because I have seen the rare instance where just squashing columns together ends up creating duplicate keys. Think 11 in first column and 1 in second column and 1 in first column, 11 in second column.

     

    I also agree with everyone else that sample data would be tremendously beneficial.

     

    Not really enough information to go on, please first check if your issue is a common issue listed here: https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882

    Also, please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

    The most important parts are:
    1. Sample data as text, use the table tool in the editing bar
    2. Expected output from sample data
    3. Explanation in words of how to get from 1. to 2.