Forum Discussion

Naveen29's avatar
Naveen29
Helper II
10 months ago
Solved

PowerBI Dashboard Line chart

I would like to show datess ( Jan 2024, May 2025, Oct 2025 etc) on the x axis of line graph. but don't want to miss in between months data in the line graph. Sample line graph.

 

 

  • Hi Naveen29,

     

    Thanks you for followup Here’s the clear answer: in the standard Power BI line chart, you can’t manually select a few custom month ticks on the X-axis while keeping it continuous; the built-in label algorithm automatically picks which dates to display to avoid crowding. There are two main workarounds: (1) Use a proper Date table and a continuous Date axis, then add X-axis constant lines (via the Analytics pane) at your chosen dates (e.g., 2024-01-01, 2025-05-01, 2025-10-01) and set each constant line’s label to “Jan 2024”, “May 2025”, “Oct 2025”. This keeps all monthly data points and gives you the three visible “labels” as annotations, not axis ticks. (2) If you need to control the actual ticks, switch to a custom visual like Deneb/Vega-Lite or Charticulator, which lets you specify tick values directly while rendering the full monthly data. Other methods (like disconnected axis tables or category axes) will either remove intermediate months, break continuity, or still leave label selection to Power BI’s automatic logic. Let me know if you’d like instructions for setting up the constant lines or a sample Deneb spec.

     

    Thank you 
    CST Member.

6 Replies

  • Hi Naveen29 ,

     Do you mean that you have data for each month, but the current visual does not show all of the months?

     

    If so, you can change the X-axis type from Continuous to Categorical like below:

     

  • v-sgandrathi's avatar
    v-sgandrathi
    Community Support

    Hi Naveen29,

     

    Thank you for your message. From your description, you would like to display specific month labels (such as Jan 2024, May 2025, Oct 2025) on the X-axis, while ensuring that all intermediate months are included in your line chart’s calculations and visualization.

    To accomplish this, keep the date axis continuous so Power BI maintains the full timeline sequence, even if some labels are hidden. Use a dedicated date table linked to your data model and ensure your date field comes from this table. This approach keeps every month’s data point in the visual, preserving the continuity of your line chart.

    If you wish to highlight only certain month names for readability, consider adding a custom column or measure in your Date table that displays the label only for the selected months, using conditional logic with the FORMAT() function. You can then use this field in tooltips, data labels, or annotations to emphasize those months without disrupting the chart’s continuity.

    Set and use date tables in Power BI Desktop - Power BI | Microsoft Learn

     

    Thank you.

  • I tried all the options , but didn't work out. How to show the some custom dates range in the line chart of x axis?

     

    • v-sgandrathi's avatar
      v-sgandrathi
      Community Support

      Hi Naveen29,

       

      Thanks you for followup Here’s the clear answer: in the standard Power BI line chart, you can’t manually select a few custom month ticks on the X-axis while keeping it continuous; the built-in label algorithm automatically picks which dates to display to avoid crowding. There are two main workarounds: (1) Use a proper Date table and a continuous Date axis, then add X-axis constant lines (via the Analytics pane) at your chosen dates (e.g., 2024-01-01, 2025-05-01, 2025-10-01) and set each constant line’s label to “Jan 2024”, “May 2025”, “Oct 2025”. This keeps all monthly data points and gives you the three visible “labels” as annotations, not axis ticks. (2) If you need to control the actual ticks, switch to a custom visual like Deneb/Vega-Lite or Charticulator, which lets you specify tick values directly while rendering the full monthly data. Other methods (like disconnected axis tables or category axes) will either remove intermediate months, break continuity, or still leave label selection to Power BI’s automatic logic. Let me know if you’d like instructions for setting up the constant lines or a sample Deneb spec.

       

      Thank you 
      CST Member.

      • v-sgandrathi's avatar
        v-sgandrathi
        Community Support

        Hi Naveen29,

         

        Just wanted to follow up and confirm that everything has been going well on this. Please let me know if there’s anything from our end.
        Please feel free to reach out Microsoft fabric community forum.