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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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