Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
8 years ago
Solved

Newbie Data Lookup

Good Day,   I was wondering if anyone could assist me with a data structure. I have a master reference table that contains multiple columns. The first column is a unique number/text and the second ...
  • MattAllington's avatar
    8 years ago

    This is the foundation of Power BI. You need to join the 2 tables with a relationship in the relationship view. The rest will just work, as long as that column in the first table is unique (as you suggest). 

     

    You may like to read my article about Relationships In Power BI.

  • MattAllington's avatar
    MattAllington
    8 years ago

    You are not allowed blanks in the table on the 1 side of the relationship.  Remove the blanks with Power Query first.

  • v-yulgu-msft's avatar
    8 years ago

    Hi Anonymous,

     

    In Query Editor mode, select the [Code] field in Table1, then, remove empty and remove duplicates.

         

     

    Then, in data view mode, add a calculated column in Table2 with LOOKUPVALUE function.

    New Column =
    LOOKUPVALUE ( Table1[Desc], Table1[Code], Table2[Code] )

     

    Best regards,

    Yuliana Gu