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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
OmkarNag99
Frequent Visitor

Continuous LIne in Bar Chart

OmkarNag99_0-1731303137954.png

"I am currently working with a bar chart in Power BI to display the count of 'SOW Visibility Week'. However, I want to convert this bar chart into a continuous line chart so that I can view the data trend smoothly over time. Even though I’ve created two DAX formulas to count the values, the chart still displays as bars rather than a continuous line."-
1)Count Sow = COUNT('Project-Tracker Main'[SOW Visibility Week ]) +0
2)SOW Visibility Count =
IF(
ISBLANK(COUNT('Project-Tracker Main'[SOW Visibility Week])),
0,
COUNT('Project-Tracker Main'[SOW Visibility Week])
)  
kindy help..

1 ACCEPTED SOLUTION
grazitti_sapna
Super User
Super User

Hi  @OmkarNag99 ,  

The primary reason your chart is displaying as bars instead of a continuous line is likely due to the nature of the SOW Visibility Week column. If it's a categorical or text-based column, Power BI will treat it as discrete, leading to a bar chart.

Solution: Converting to a Continuous Date:

To achieve a continuous line chart, we need to convert SOW Visibility Week into a continuous date format. Here's how you can do it:

 

 

  • Create a New Calculated Column:
    DAX
    ContinuousDate =
    DATE(
        YEAR('Project-Tracker Main'[SOW Visibility Week]),
        MONTH('Project-Tracker Main'[SOW Visibility Week]),
        DAY('Project-Tracker Main'[SOW Visibility Week])
    )
  • Create a Line Chart:

     

      • Drag the ContinuousDate column to the X-axis of a new line chart.
      • Drag the SOW Visibility Count measure to the Y-axis.

         

Addressing Missing Values (Optional):

If you have missing dates in your data, you can use the COALESCE function to replace them with 0 or another appropriate value:

Code snippet

SOW Visibility Count =
COALESCE(
    COUNT('Project-Tracker Main'[SOW Visibility Week]),
    0
)

 

 Additional Tips:

  • Data Consistency: Ensure that your SOW Visibility Week column has consistent date formatting.
  • Date Hierarchy: If you want to visualize trends at different granularities (e.g., daily, weekly, monthly), consider creating a date hierarchy in your data model.
  • Data Gaps: If there are significant gaps in your data, you might need to implement techniques like interpolation or extrapolation to create a smoother line chart.
  • Chart Formatting: Customize the line chart's appearance (line color, thickness, markers) to enhance readability.

    By following these steps, you should be able to successfully convert your bar chart into a continuous line chart, providing a clear visual representation of the data trend over time.

    If you have further questions or encounter specific challenges, feel free to provide more details about your data model and the desired visualization.

If I have resolved your question, please consider marking my post as a solution🎉. Thank you!

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @OmkarNag99 

 

Have you solved your problem? Was grazitti_sapna 's answer helpful? If so, could you please mark his reply as a solution? This will help more users facing the same or similar difficulties. Thanks!

 

Please feel free to let me know if there are still problems.

 

Best Regards,
Yulia Xu

grazitti_sapna
Super User
Super User

Hi  @OmkarNag99 ,  

The primary reason your chart is displaying as bars instead of a continuous line is likely due to the nature of the SOW Visibility Week column. If it's a categorical or text-based column, Power BI will treat it as discrete, leading to a bar chart.

Solution: Converting to a Continuous Date:

To achieve a continuous line chart, we need to convert SOW Visibility Week into a continuous date format. Here's how you can do it:

 

 

  • Create a New Calculated Column:
    DAX
    ContinuousDate =
    DATE(
        YEAR('Project-Tracker Main'[SOW Visibility Week]),
        MONTH('Project-Tracker Main'[SOW Visibility Week]),
        DAY('Project-Tracker Main'[SOW Visibility Week])
    )
  • Create a Line Chart:

     

      • Drag the ContinuousDate column to the X-axis of a new line chart.
      • Drag the SOW Visibility Count measure to the Y-axis.

         

Addressing Missing Values (Optional):

If you have missing dates in your data, you can use the COALESCE function to replace them with 0 or another appropriate value:

Code snippet

SOW Visibility Count =
COALESCE(
    COUNT('Project-Tracker Main'[SOW Visibility Week]),
    0
)

 

 Additional Tips:

  • Data Consistency: Ensure that your SOW Visibility Week column has consistent date formatting.
  • Date Hierarchy: If you want to visualize trends at different granularities (e.g., daily, weekly, monthly), consider creating a date hierarchy in your data model.
  • Data Gaps: If there are significant gaps in your data, you might need to implement techniques like interpolation or extrapolation to create a smoother line chart.
  • Chart Formatting: Customize the line chart's appearance (line color, thickness, markers) to enhance readability.

    By following these steps, you should be able to successfully convert your bar chart into a continuous line chart, providing a clear visual representation of the data trend over time.

    If you have further questions or encounter specific challenges, feel free to provide more details about your data model and the desired visualization.

If I have resolved your question, please consider marking my post as a solution🎉. Thank you!

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors