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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
prakash11440278
Post Prodigy
Post Prodigy

Gap between Actuals & Forecast data in Line Chart

Hi Power BI Experts,

How can i reduce the gap between acutal & forecast data in Line chart. I am using date dimension in axis and there is no dates gap between them. How can i show continious data with out displaying the gap. Please help.

 

 

prakash11440278_0-1686209976522.png

 

1 ACCEPTED SOLUTION
MFelix
Super User
Super User

Hi @prakash11440278 ,

 

When you refer that there is no gap you mean that the actuals end in 5th January and the Forecast in 6 of January?

MFelix_0-1686243719596.png

In this case you need to create a measure for the forecast to make the connection depends on how you have the calculation and the model on my case I have 

forecast adjusted =
VAR maximumactual =
    MAXX ( FILTER ( ALL ( 'Table' ), 'Table'[Actuals] > 0 ), 'Table'[Date] )
RETURN
    IF (
        SELECTEDVALUE ( 'Table'[Date] ) = maximumactual,
        SUM ( 'Table'[Actuals] ),
        SUM ( 'Table'[Forecast] )
    )

 

In this case I pick up the maximum date of actuals and for that date I return the actuals for any other date I return the forecast final result below:

 

MFelix_1-1686244003318.png

The only thing is that on the specific day you have both values on the tooltip for that day.

MFelix_2-1686244046719.png

 

 

 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

1 REPLY 1
MFelix
Super User
Super User

Hi @prakash11440278 ,

 

When you refer that there is no gap you mean that the actuals end in 5th January and the Forecast in 6 of January?

MFelix_0-1686243719596.png

In this case you need to create a measure for the forecast to make the connection depends on how you have the calculation and the model on my case I have 

forecast adjusted =
VAR maximumactual =
    MAXX ( FILTER ( ALL ( 'Table' ), 'Table'[Actuals] > 0 ), 'Table'[Date] )
RETURN
    IF (
        SELECTEDVALUE ( 'Table'[Date] ) = maximumactual,
        SUM ( 'Table'[Actuals] ),
        SUM ( 'Table'[Forecast] )
    )

 

In this case I pick up the maximum date of actuals and for that date I return the actuals for any other date I return the forecast final result below:

 

MFelix_1-1686244003318.png

The only thing is that on the specific day you have both values on the tooltip for that day.

MFelix_2-1686244046719.png

 

 

 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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.