Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago

Need new table given relationship between two others

Hi!

 

Table1 is a list of 130 different animals, each one has a unique ID

Table 2 is a list of 40.000 animals

Table 3 should have same length than Table 2 but replace each animal with its ID

 

Table 1 (130 rows)

column1column2
1dog
2cat
3bird
4tiger
5penguin

 

Table 2 (40.000 rows)

column1
dog
dog
dog
penguin
cat

 

And need table3 (40.000 rows) as follows:

 

column1
1
1
1
5
2

3 Replies

  • Anonymous just use a table visual and drop column1 from table 1 and column 1 from table 2, assuming table 1 and table 2 have a relationship with table 1 on one side and table 2 on many sides. Why do you want to create table 3 when you can visualize the data without creating a new table? 

     

    Follow us on LinkedIn

     

    Learn about conditional formatting at Microsoft Reactor

    My latest blog post The Power of Using Calculation Groups with Inactive Relationships (Part 1) (perytus.com) I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

     

    Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.

  • Hi,

    You should create a relationship from the Column1 of Table2 to Column2 of Table1.  Write the RELATED() function in Table2 to get column1 from Table1.

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous ,

     

    Does the replies above solve your problem? If it has been solved, please mark the correct reply as the standard answer to help the other members find it more quickly.Thanks in advance for your kind cooperation!

     

    Hope it helps,


    Community Support Team _ Caitlyn

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