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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
MacJasem
Helper III
Helper III

Connecting line between gaps in a clustered line & bar chart?

I've got a line in my clustered line & bar chart that has gaps. i wish the line could be connected between gaps:

MacJasem_0-1740837286041.png

the orange line as you can see has gaps and i would like to know a way to have the line be continous over the dates with no values. is that possible?

 

this is the measure behind the orange line:


Realized = 

VAR LastApprovalDate = CALCULATE(MAX('Documents'[Planned Approval Date]), 'Documents'[Status] = "Approved")
VAR CurrentDate = MAX('DateTable'[Date])
VAR PreviousValue =
    CALCULATE(
        COUNT('Documents'[Status]),
        FILTER(
            ALL('DateTable'),
            'DateTable'[Date] < CurrentDate && 'DateTable'[Date] <= LastApprovalDate
        )
    )
RETURN
IF(
    CurrentDate <= LastApprovalDate,
    CALCULATE(
        COUNT('Documents'[Status]),
        FILTER(
            ALLSELECTED('DateTable'[Date]),
            'DateTable'[Date] <= LastApprovalDate
        )
    ),
    PreviousValue
)
8 REPLIES 8
v-bmanikante
Community Support
Community Support

Hi @MacJasem ,

 

We would like to follow up to see if the solution provided by the super user resolved your issue. Please let us know if you need any further assistance.
If our super user response resolved your issue, please mark it as "Accept as solution" and click "Yes" if you found it helpful.

Regards,
B Manikanteswara Reddy

v-bmanikante
Community Support
Community Support

Hi @MacJasem ,

 

We would like to follow up to see if the solution provided by the super user resolved your issue. Please let us know if you need any further assistance.
If our super user response resolved your issue, please mark it as "Accept as solution" and click "Yes" if you found it helpful.

Regards,
B Manikanteswara Reddy

v-bmanikante
Community Support
Community Support

Hi @MacJasem ,

 

We would like to follow up to see if the solution provided by the super user resolved your issue. Please let us know if you need any further assistance.
If our super user response resolved your issue, please mark it as "Accept as solution" and click "Yes" if you found it helpful.

Regards,
B Manikanteswara Reddy

 

DataNinja777
Super User
Super User

Hi @MacJasem ,

 

You can make the orange line continuous in your clustered line & bar chart in Power BI by ensuring that missing values are filled with the last available value. Since Power BI does not automatically interpolate missing data points in a line chart, the best approach is to modify your DAX measure to return the last known value instead of BLANK(). This way, the line remains continuous even if there are gaps in the data.

To do this, update your Realized measure by implementing a forward-fill logic. This modified measure ensures that if a value is missing for a given date, the previous available value is carried forward.

Realized = 
VAR LastApprovalDate = CALCULATE(MAX('Documents'[Planned Approval Date]), 'Documents'[Status] = "Approved")
VAR CurrentDate = MAX('DateTable'[Date])
VAR PreviousValue =
    CALCULATE(
        COUNT('Documents'[Status]),
        FILTER(
            ALL('DateTable'),
            'DateTable'[Date] < CurrentDate && 'DateTable'[Date] <= LastApprovalDate
        )
    )
VAR CurrentValue =
    CALCULATE(
        COUNT('Documents'[Status]),
        FILTER(
            ALLSELECTED('DateTable'[Date]),
            'DateTable'[Date] <= LastApprovalDate
        )
    )
RETURN
IF(
    ISBLANK(CurrentValue),
    PreviousValue,  
    CurrentValue
)

This measure ensures that whenever there is no data for a given date, it returns the last available count instead of leaving a gap. Additionally, adjusting the X-Axis settings in the Format Pane can further help in smoothing the visualization. Ensure that "Show Items with No Data" is enabled, and set the X-Axis type to "Continuous" instead of "Categorical" if your date field supports it. This prevents breaks in the line and provides a smoother trend across time. Let me know if you need further refinements.

 

Best regards,

Thanks @DataNinja777

I'm not seeing the "Show items with No data" option nor the "Continuous" option. Could you perhaps show me screenshots of where i find those options cause i can't see/find them 🙂  

Anonymous
Not applicable

HI @MacJasem,

Have you tried to add +0 to you expression to force these calculations on all the axis field ranges?

Regards,

Xiaoxin Sheng

Thanks @Anonymous 

Can you perhaps elaborate or give an example of where and how to add the expression?

Anonymous
Not applicable

HI @MacJasem,

The +0 will force the calculation on blank value Dax range to return zero instead blank. By default power bi visuals will hide the blank part in visualization if they have not corresponded values. 

BTW, your formula is calculated on range, so +0 will look up the previous value to instead the zero.

How to return 0 instead of BLANK in DAX - SQLBI

Regards,

Xiaoxin Sheng

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.