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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
byronkelly
New Member

line chart

I am trying to plot a basic line chart, where I can compare 3 lines (volume X Year) . When i plot each line individually, the line plots correctly. However when i plot all three lines on a single plot, the number for 2 of the 3 lines are wrong.

 

For example, line 1, 2 and 3 each have values from 0-1000, with line 1 generally larger than line 2, and line 2 larger than line 3.

 

When i plot them all on a single plot, line 1 retains its original values but the values of line 2 and 3  change to a constant 217,930 for all years.

 

Any help would be appreciated. Sorry i can not include an image.

1 REPLY 1
MFelix
Super User
Super User

Hi @byronkelly,

 

Can you share some more insight on what you are making?

 

  • Are you using measures or values from a column? 
  • Are all the values from the same table?
  • Do you have an X-axis that is common?

 

Based on your explanation I'm assuming that you are using information for X-Axis from the same table for line 1 and the other 2 lines are from another table or tables without a relationship to the 1st one.

 

If this is what is happening the result you are getting is the line 1 correct since it's related with the values on X-Axis, and the other two lines are calculated based on it's total number of data points (count or a sum) for the full table where they.

You are getting a constant since the line chart can't determine the context for line 2 and 3 so it return the full sum of those values.

 

To overcome this you need to have a relationship between the tables you are using in that way when you use a column on the X-Axis all of the value place in the chart will be related and summarized accordingly.

 

I know this is a little bit theorical but without any additional information is difficult to give you a better answer.

 

In attach is a PBIX file with 5 tables:

  • 2 table with no relation and place on the same chart, as you can see you have 1 line that is a constant
  • 2 tables related by a Dimension table (category) that is used for the 2nd chart and giving the correct values.

relation.png

 

Believe this is your issue, but if not please tell me more specifications on your data model so I can help you.

 

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



Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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