Forum Discussion
Line Chart appears non-continuous
- 1 year ago
Hi peternguyen2 ,
Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
Do not include sensitive information. Do not include anything that is unrelated to the issue or question.Please show the expected outcome based on the sample data you provided.
How to provide sample data in the Power BI Forum - Microsoft Fabric CommunityRegards,
Harshitha.
Hi peternguyen2 ,
The reason your line chart in Power BI appears non-continuous, with breaks or disconnected points for each line (Line1, Line2, Line3), is due to how Power BI plots the data when the X-axis (Order) contains categorical values and not every Line has a value for every Order.
Here’s what’s happening:
-
Disjointed Lines: In your dataset, each Order is processed on only one Line (i.e., each Order is associated with only one Line, not all three). This means that, for each unique Order value on the X-axis, only one of Line1, Line2, or Line3 has a corresponding NetWeight value; the other two Lines have no data for that Order.
-
Missing Data Points: Power BI expects a continuous sequence of data points for a “continuous” line. When data is missing (i.e., for a particular Order, there is no NetWeight for some Lines), Power BI leaves a gap in the line, making it appear non-continuous or segmented.
How to Fix or Improve the Chart:
-
Data Structure: If you want continuous lines, you would need a data structure where each Order has a value (even if it’s blank or zero) for every Line. This would result in a “step-like” chart, but it would make the lines technically continuous.
-
Alternative Visualization: If your process is such that only one Line processes each Order, a line chart may not be the best visual. A scatter plot with connecting lines or a combination of a scatter and line chart might better represent your data, or you could use a stacked column/bar chart if your focus is comparing NetWeight by Line.
-
Show as-is: If you want to keep the current chart, just be aware that the non-continuous lines are a direct result of your data’s structure—there are simply no NetWeight values for Line1 and Line2 for Orders handled by Line3, etc.