Forum Discussion
Line chart broken
- Anonymous1 year ago
Hi atoice ,
Considering the current limitations in sharing the dataset due to character constraints and security policies, I would recommend raising a support ticket. They will be able to assist you more effectively.
To raise a support ticket for Fabric and Power BI, kindly follow the steps outlined in the following guide:
How to create a Fabric and Power BI Support ticket - Power BI | Microsoft Learn
If this post helps, then please give us Kudos and consider Accept it as a solution to help the other members find it more quickly.
Thankyou.
Hi atoice
Thank you for the update, and I completely understand that adjusting weeks and months manually especially when dealing with edge cases like week-ending dates can be time-consuming.
To fully resolve the line breaks and ensure consistent plotting across all years, the most reliable approach is to use a dedicated Calendar Table in Power BI with consistent week and date alignment.
Since you mentioned you're not familiar with building one, here’s a ready-to-use Power Query script that you can paste directly into Power BI to generate a proper calendar:
To get started, open your Power BI Desktop file. Then, go to the Home tab and click on Transform Data this will open the Power Query Editor. Inside the editor, click on New Source and choose Blank Query. After that, open the Advanced Editor and paste the calendar script provided into the window. Once done, click Done and then Close & Apply to load the new calendar table into your model.
let
StartDate = #date(2023,1,1),
EndDate = #date(2025,12,31),
DatesList = List.Dates(StartDate, Duration.Days(EndDate - StartDate) + 1, #duration(1,0,0,0)),
TableDates = Table.FromList(DatesList, Splitter.SplitByNothing(), {"Calendar Date"}),
AddYear = Table.AddColumn(TableDates, "Year", each Date.Year([Calendar Date])),
AddMonth = Table.AddColumn(AddYear, "Calendar Month", each Date.ToText([Calendar Date], "MMM")),
AddMonthNum = Table.AddColumn(AddMonth, "Month Number", each Date.Month([Calendar Date])),
// Calculate Week Number based on ISO 8601 (week starts Monday)
AddWeekNum = Table.AddColumn(AddMonthNum, "Calendar Week", each Date.WeekOfYear([Calendar Date], Day.Monday)),
// Calculate Week Ending (Sunday)
AddWeekEnd = Table.AddColumn(AddWeekNum, "Calendar WE", each Date.EndOfWeek([Calendar Date], Day.Sunday)),
// Optionally add Month Quarter
AddQuarter = Table.AddColumn(AddWeekEnd, "Calendar Month.Quarter", each "Qtr-" & Text.PadStart(Text.From(Date.QuarterOfYear([Calendar Date])),1,"0")),
// Sort by date if needed
SortedTable = Table.Sort(AddQuarter,{{"Calendar Date", Order.Ascending}})
in
SortedTable
After pasting the script, click Close & Apply to load the calendar. Then go to the Modeling tab, select Mark as Date Table, and choose the Calendar Date column. Lastly, link it to the date column in your sales table to ensure your visuals display correctly.
With this structure in place, your visuals should automatically align weeks consistently across all years, eliminating the breaks you're seeing especially in weeks like 13, 26, and 48.
Also, if your current layout is already accepted by your team and serves the intended purpose, your existing solution (continuous X-axis with small gaps) is perfectly valid.
I hope this will resolve your issue, if you need any further assistance, feel free to reach out.
If this post helps, then please give us Kudos and consider Accept it as a solution to help the other members find it more quickly.
Thankyou.
Hi atoice ,
I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions. If my response has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.
Thank you.
- atoice1 year agoFrequent Visitor
Hi V-tsai,
I am unable to put in the table as it says too many characters and I cannot share in the cloud with a link due to company security. Unless you can do it with less data and simulate. I appreciate everything you have done to help.
- Anonymous1 year agoNot applicable
Hi atoice ,
Considering the current limitations in sharing the dataset due to character constraints and security policies, I would recommend raising a support ticket. They will be able to assist you more effectively.
To raise a support ticket for Fabric and Power BI, kindly follow the steps outlined in the following guide:
How to create a Fabric and Power BI Support ticket - Power BI | Microsoft Learn
If this post helps, then please give us Kudos and consider Accept it as a solution to help the other members find it more quickly.
Thankyou.
- atoice1 year agoFrequent Visitor
Thank you V-tsai again for your help. I will shoot them something and see. But it has worked for what we need currently. Just figured I would try to manipulate dates / months / etc. to stop the break in the lines.