Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
AbbasAsaria90
Helper I
Helper I

combining data of two tables into one graph

Hi, PBI community!

 

I have two tables:

  • Sales: Each row relates to a single line item sold
  • Sales Targets: The first column is the week, the second column is the target for that week

With these, I can make two separate graphs that you can see below

 

 

However, I'd like the two lines superimposed on the same graph. When I try to combine the two into the same graph, as shown in the below picture, I can only seem to get the second line as a constant (either the sum, avg, etc of all the values) as opposed to plotted against the x-axis. 

 

 

Any suggestions?

Thanks!

1 ACCEPTED SOLUTION
MFelix
Super User
Super User

Hi @AbbasAsaria90,

 

The problem here is that you are placing in the axis the week from one of the tables and getting the line of that table since on the second table there is no data for the week column you are refering you don't have a line.

When you add both weeks on the axis what you are making is an hierarchy and not a single axis.

 

You need to make a relationsoship between the two table by the week column or create a table with the weeks and then relate the two tables to that one.

 

Regards,

MFelix


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

2 REPLIES 2
MFelix
Super User
Super User

Hi @AbbasAsaria90,

 

The problem here is that you are placing in the axis the week from one of the tables and getting the line of that table since on the second table there is no data for the week column you are refering you don't have a line.

When you add both weeks on the axis what you are making is an hierarchy and not a single axis.

 

You need to make a relationsoship between the two table by the week column or create a table with the weeks and then relate the two tables to that one.

 

Regards,

MFelix


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Perfect! I made a date table and related both to that

 

Thanks

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors