The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hi All,
I have a dataset named OrderWeight in Power BI, and I want to create a line chart based on the following:
Order on the X-axis
NetWeight on the Y-axis
Line (which contains three categories: Line1, Line2, and Line3) used as the Legend in the Power BI visual.
The columns in the dataset do not contain any null or blank values.
Why do the lines not display continuously?
Please see the attached screenshot.
Solved! Go to Solution.
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.
How to provide sample data in the Power BI Forum - Microsoft Fabric Community
Harshitha.
Hello Community,
My apologies for the confusion.
I was trying to display continuous lines for each category (Line1, Line2, and Line3).
I noticed that when I replace the Order column with ProductionDate, the line chart appears continuous, as shown in the attached screenshot.
However, my business users want the X-axis to show Order. I’ve tried different approaches, but it’s not working.
Could you please help me?
Thank you in advance.
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.
How to provide sample data in the Power BI Forum - Microsoft Fabric Community
Harshitha.
Hi @peternguyen2,
Just checking in to see if you had a chance to follow up on our earlier conversation. If you're still encountering the issue, please share the sample data so we can assist you with an accurate solution.
If you have any further questions, feel free to reach out anytime.
Regards,
Harshitha.
Hi @peternguyen2,
Hope everything’s working fine now! If you’ve found a fix, feel free to share it . It really helps others in the community. If the issue persists, please provide a sample dataset so we can assist you with a solution. Don’t hesitate to reach out if you need further help.
Regards,
Harshitha.
Hi @peternguyen2,
I hope the information provided above assists you in resolving the issue. If you have any additional questions or concerns, please do not hesitate to contact us. We are here to support you and will be happy to help with any further assistance you may need.
Regards,
Harshitha.
That behavior is expected because using a column in the legend splits the values into separate groups, preventing any overlap. Some possible workarounds, though not ideal:
- Conditionally formatting a column chart prior to converting it to a line chart
Please see this vlog - https://youtu.be/3WXwIC8j6Y8?si=r54rttQmD8NxLwBY
-Use mutiple measures: one for each legend value and another one that isn't filtered down to a legend value.
In both approaches, however, the legends are separate from the line chart visual itself. The first approach relies on conditional formatting, so no legends are displayed. The second approach uses four separate measures, resulting in an additional legend that must be hidden.
Please se the attached pbix.
Hi @peternguyen2 ,
The line is not continuous because you have a legend line1, line2, line 3 which separates them.
If you will remove the legend, it will be continuous.
@peternguyen2 Hello,
Kindly follow below steps to resolve your issue.
STep 1 - If you're using a measure then you can use COALESCE or IF Logic.
example -
samplemeasure = COALESCE(SUM(OrderWeight[NetWeight]), 0)
this will avoid gap in your data and it will auto fill 0 in case of missing value.
STep 2- Change in chart setting
format -> x axis setting -> show item with no data to on
Set Type to Categorical instead of Continuous
Thanks
Harish KM
Please accept this as a solution if this solves your problem and give kudos as well.
Thank you for your solution. I have tried by did not work
Hello,
I think with that type of chart you can't tell a story from the structure of your data ... can you please just tell what story you what to present with that data because it looks like you are doing comparison of weight by line but not trend so choose you chart wisely?
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.
Hi,
Share the download link of the PBI file.