Forum Discussion

jppuam's avatar
jppuam
Helper V
5 years ago
Solved

problem with userrelationship

Hello,

i want to conbine information from two tables but they are connected to other tables and i cant make it right according to what i need.

I've made a picture with the data from table A and B, and the table below with the result that i needed.

I've try to use USERELATIONSHIP function but i cant make it work (is like i make a full join of the tables) . The key between them is "Key". Can you help me with this problem ?

 

 

Thanks,

JP

  • jppuam Although what VijayP is suggesting would work but I believe (trust me), appending the tables in Power Query is your best otherwise you are going to do un-necessary work with DAX, if you have to create another DImension table, means you need all the keys in that table and it goes back to appending the table in the Power Query.

     

    Good luck!

     

    Check my latest blog post Improve UX: Show Year in Legend When Using Time Intelligence Measures | PeryTUS IT Solutions  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.

8 Replies

  • jppuam it will be easier to append these tables in the Power Query and then remove duplicate rows so you have the final table with the output you are looking for.

     

    Check my latest blog post Improve UX: Show Year in Legend When Using Time Intelligence Measures | PeryTUS IT Solutions  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.

  • VijayP's avatar
    VijayP
    Community Champion

    jppuam 

    I Think parry2k suggestion is Good, however There is another way in my opinion which is to create another column combining both project id and sub project id and apply use relationship . Even the Dimension table should have the combined column in this case

    • jppuam's avatar
      jppuam
      Helper V

      Hi VijayP

      But thats what is the Key (concatenate Project and subproject).

      How do you use userelationship in this case to give me the final table ?

       

      thanks

      JP

      • VijayP's avatar
        VijayP
        Community Champion

        Create a Dim Table Having The conctenated Field and Connect that to one Fact Table and then use relation ship to bring other table values here!

         

  • jppuam Although what VijayP is suggesting would work but I believe (trust me), appending the tables in Power Query is your best otherwise you are going to do un-necessary work with DAX, if you have to create another DImension table, means you need all the keys in that table and it goes back to appending the table in the Power Query.

     

    Good luck!

     

    Check my latest blog post Improve UX: Show Year in Legend When Using Time Intelligence Measures | PeryTUS IT Solutions  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.