cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
KWelsh8144 Regular Visitor
Regular Visitor

Combining data from two different tables

Hi, I'm currently using Direct Query (and cannot change to import since it needs to be live) and cannot figure out how to get the data to display the way I need it to.

 

I have two tables that are joined by the ID. One of the tables lists projects and the other table lists the tasks associated with the projects.

 

For example, project 1 may have 5 tasks associated with it. I'm looking to design a table that lists the projects but with the tasks inserted (indented) under the project.

 

Is this possible?

 

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
KWelsh8144 Regular Visitor
Regular Visitor

Re: Combining data from two different tables

I managed to this to work by starting over. I had added one column to the table, so i'm not sure if  that's what was holding this up or what, but i did manage to get this to work.

 

Thanks for your help!

7 REPLIES 7
Moderator v-yuezhe-msft
Moderator

Re: Combining data from two different tables

@KWelsh8144,

You can merge the two queries in Power BI Desktop query editor based on ID, for more details, please review this blog:http://radacad.com/append-vs-merge-in-power-bi-and-power-query.

Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Moderator v-yuezhe-msft
Moderator

Re: Combining data from two different tables - Status changed to: Delivered

 
Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
KWelsh8144 Regular Visitor
Regular Visitor

Re: Combining data from two different tables

Capture.PNG

 

I am receiving this error when i close & apply. What can I do to get passed this? @v-yuezhe-msft

Moderator v-yuezhe-msft
Moderator

Re: Combining data from two different tables

@KWelsh8144,

What version of Power BI Desktop do you use? Do you merge into a new query using the highlighted option below? If so, switch  to use merge queries option. If the issue still persists, please share the T-sql you use to create the two tables so that I can test.

1.PNG

Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
KWelsh8144 Regular Visitor
Regular Visitor

Re: Combining data from two different tables

@v-yuezhe-msft I am using the October 2018 version. I originally had it as the highlighted option: Merge Queries as New. I tried it using Merge Queries and I receive the message below.Capture.PNG

 

 

Moderator v-yuezhe-msft
Moderator

Re: Combining data from two different tables

@KWelsh8144,

Could you please post the T-SQL statements that you use to create the tables so that I can repro? Also we need to know what other transformations you made in Power BI Desktop Query Editor .

Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
KWelsh8144 Regular Visitor
Regular Visitor

Re: Combining data from two different tables

I managed to this to work by starting over. I had added one column to the table, so i'm not sure if  that's what was holding this up or what, but i did manage to get this to work.

 

Thanks for your help!