Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Link two data tables to get column value from two different length part numbers

Hi All

I have two tables as seen below, with one table call Catalog # and the second table call Catalog Table. For the Catalog # table I need the Category Name pulled from the second table. Any help is welcome. Thanks

 

 

10 Replies

  • selimovd's avatar
    selimovd
    Icon for Most Valuable Professional rankMost Valuable Professional

    Hey Anonymous ,

     

    would be easier when you show the details in Power BI. Now I can just guess they are connected in a 1:1 relationship.

    In this case you can just use the RELATED function as calculated column:

    Category Name = RELATED( 'Catalog Table'[Category Name] )

     

    Otherwise you could also use LOOKUPVALUE to find the value.

     

    If you need any help please let me know.
    If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍
     
    Best regards
    Denis
     
    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi Denis

      I have the relationship 1:1 setup from Catalog # to the to the catalog table to the short item number but struggle with the measure to pull the informaton of the Catelong table fields when the Catalong # is either a short or long number.

       

      Thanks for your support

      • Ashish_Mathur's avatar
        Ashish_Mathur
        Icon for Super User rankSuper User

        Hi,

        Share data in a format that can be pasted in an MS Excel file.

  • v-henryk-mstf's avatar
    v-henryk-mstf
    Icon for Community Support rankCommunity Support

    Hi Anonymous ,

     

    According to the information you provide, you can create a one-to-one relationship between the two tables, and then add the catalong field to the slicer. I did a test for reference as follows:

     


    If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.


    Best Regards,
    Henry


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

    • Anonymous's avatar
      Anonymous
      Not applicable

      Thanks for the reply . So the first table Catelog # could have a short or long number and yes I can do the 1 to 1 relationship.

       

      If the Catalog # is a long  or short number (can't control)  but I need to look up to the Catelog table and have power bi determine if the catalog # is short and long and pull the category name. Let me know if this provides clarity.

       

       

  • Anonymous's avatar
    Anonymous
    Not applicable

    Thanks this works. I appreciate your help